/** * User: Julia.Radzhabova * Date: 06.03.15 * Time: 11:46 */ if (Common === undefined) var Common = {}; Common.Views = Common.Views || {}; define([ 'common/main/lib/util/utils', 'common/main/lib/component/BaseView', 'common/main/lib/component/Layout' ], function (template) { 'use strict'; Common.Views.History = Common.UI.BaseView.extend(_.extend({ el: '#left-panel-history', storeHistory: undefined, template: _.template([ '
', '
', '
<%=scope.textHistoryHeader%>
', '
', '
', '
', '
' ].join('')), initialize: function(options) { _.extend(this, options); Common.UI.BaseView.prototype.initialize.call(this, arguments); }, render: function(el) { el = el || this.el; $(el).html(this.template({scope: this})).width( (parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN); this.viewHistoryList = new Common.UI.DataView({ el: $('#history-list'), store: this.storeHistory, enableKeyEvents: false, itemTemplate: _.template([ '
', '
<%= created %>
', '<% if (markedAsVersion) { %>', '
ver.<%=version%>
', '<% } %>', '
', '
', '
<%= Common.Utils.String.htmlEncode(username) %>', '
', '
' ].join('')) }); this.btnBackToDocument = new Common.UI.Button({ el: $('#history-btn-back'), enableToggle: false }); this.trigger('render:after', this); return this; }, textHistoryHeader: 'Back to Document' }, Common.Views.History || {})) });