{"version":3,"sources":["kendo.gantt.editors.js"],"names":["f","define","$","normalizeText","text","String","replace","REPLACE_REGEX","SPACE","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","zeroSize","width","height","baseline","measureText","style","measureBox","TextMetrics","current","measure","LRUCache","DEFAULT_OPTIONS","defaultMeasureBox","window","kendo","util","Class","extend","init","size","this","_size","_length","_map","put","value","map","entry","_head","_tail","newer","older","get","baselineMarkerSize","document","createElement","cssText","options","_cache","styleKey","cacheKey","cachedResult","baselineMarker","textStr","box","_baselineMarker","cloneNode","textContent","appendChild","body","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","marker","deepExtend","jQuery","amd","a1","a2","a3","undefined","ui","browser","support","Observable","Widget","outerWidth","_outerWidth","keys","F10","proxy","isPlainObject","NS","PERCENTAGE_FORMAT","TABINDEX","CLICK","WIDTH","STRING","ARIA_DESCENDANT","ACTIVE_OPTION","DOT","DIRECTIONS","down","origin","position","up","TASK_DROPDOWN_TEMPLATE","template","ganttStyles","buttonDelete","buttonCancel","buttonSave","focused","gridContent","hovered","item","popupWrapper","popupList","popup","form","editForm","formContainer","resourcesFormContainer","message","buttonsContainer","button","editField","editLabel","resourcesField","primary","toolbar","appendButton","DATERANGEEDITOR","container","attr","name","field","title","validationRules","model","fields","validation","appendTo","hide","RESOURCESEDITOR","styles","messages","assignButton","click","TaskDropDown","element","fn","call","_popup","direction","navigatable","destroy","clearTimeout","_focusTimeout","off","list","unbind","_adjustListWidth","computedStyle","computedWidth","wrapper","listOuterWidth","data","getComputedStyle","parseFloat","mozilla","msie","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","css","fontFamily","_current","method","find","sibling","removeClass","removeAttr","addClass","that","itemSelector","actions","addChild","insertBefore","insertAfter","append","Popup","anchor","open","animation","on","e","target","action","preventDefault","trigger","type","end","aria-activedescendant","focus","hover","close","bind","parents","keyCode","UP","DOWN","ENTER","ESC","editors","desktop","dateRange","resources","Editor","createButton","plannedEditors","editor","editable","start","percentComplete","format","splice","apply","concat","plannedStart","plannedEnd","_buildEditTemplate","editableFields","tmpl","settings","Template","templateSettings","paramName","popupStyles","html","unescape","expr","PopupEditor","is","editTask","task","_createPopupEditor","showDialog","buttons","eq","buttonIndex","currentTarget","index","kendoWindow","modal","autoFocus","resizable","draggable","visible","deactivate","getKendoWindow","center","editableWidget","uid","save","className","cancel","editorTitle","userTriggered","kendoEditable","clearContainer","validateOnBlur","cycleForm","stopPropagation","updateInfo","ResourceEditor","_initContainer","_attachHandlers","events","_dettachHandlers","grid","closeHandler","_cancelProxy","_cancel","_saveProxy","_save","row","closest","dataSource","getByUid","set","_createButtons","dom","resourcesEditorTitle","resize","_resourceGrid","Grid","columns","resourcesHeader","unitsHeader","dataItem","valueFormat","toString","sortable","filterable","schema","id","from","unitsValidation","values","parent","prop","_updateModel","gantt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBAAsB,cAAeD,IAC9C,YACG,SAAUE,GAqDP,QAASC,GAAcC,GACnB,OAAcA,EAAPC,IAAaC,QAAQC,EAAeC,GAE/C,QAASC,GAAUC,GAAnB,GAEaC,GADLC,IACJ,KAASD,IAAOD,GACZE,EAAMC,KAAKF,EAAMD,EAAOC,GAE5B,OAAOC,GAAME,OAAOC,KAAK,IAE7B,QAASC,GAAQC,GAAjB,GAEaC,GADLC,EAAO,UACX,KAASD,EAAI,EAAGA,EAAID,EAAIG,SAAUF,EAC9BC,IAASA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IAAMA,GAAQ,IACzEA,GAAQF,EAAII,WAAWH,EAE3B,OAAOC,KAAS,EAEpB,QAASG,KACL,OACIC,MAAO,EACPC,OAAQ,EACRC,SAAU,GA0DlB,QAASC,GAAYtB,EAAMuB,EAAOC,GAC9B,MAAOC,GAAYC,QAAQC,QAAQ3B,EAAMuB,EAAOC,GAtIvD,GAEOI,GAiDAzB,EACAC,EA0BAyB,EACAC,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U,GAEdpL,OACIyQ,KAAM,QACN1G,KAAM,SACN7D,WAAYvG,KAAKiB,QAAQ8P,iBAE7BnF,QACIkF,KAAM,SACN1G,KAAM,cAM1B+D,KAAM,SAAUpE,GACZ,GAAI1J,KAAU0J,EAAEiH,OAAO3Q,KACvB0J,GAAEhE,UAAUkL,SAASnI,KAAK,0BAA4BoI,KAAK,UAAW7Q,OAIlFmP,MAAO,SAAUzF,GACbA,EAAEG,iBACFlK,KAAKmR,eACAnR,KAAK+H,QAAQ+E,GAAGhJ,EAAMQ,EAAYU,MAAMU,iBACzC1F,KAAKmK,QAAQ,QACTpE,UAAW/F,KAAK+H,QAChB1B,MAAOrG,KAAKqG,QAGpBrG,KAAKyK,SAET0G,aAAc,WAAA,GAEN9Q,GAEK7B,EAAOE,EAHZ0M,KAEAnD,EAAOjI,KAAKmP,KAAKQ,WAAW1H,MAChC,KAASzJ,EAAI,EAAGE,EAASuJ,EAAKvJ,OAAQF,EAAIE,EAAQF,IAC9C6B,EAAQ4H,EAAKzJ,GAAGoC,IAAI,SACN,OAAVP,GAAkBA,EAAQ,GAC1B+K,EAAUjN,KAAK8J,EAAKzJ,GAG5BwB,MAAKqG,MAAMrG,KAAK0F,gBAAkB0F,IAG1C1L,GAAM0R,OACFrK,aAAcA,EACdsE,OAAQA,EACRwB,YAAaA,EACbiC,eAAgBA,IAEtBrP,OAAOC,MAAM2C,QACR5C,OAAOC,OACE,kBAAVnC,SAAwBA,OAAO+E,IAAM/E,OAAS,SAAUgF,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.gantt.editors.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/text-metrics', ['kendo.core'], f);\n}(function () {\n (function ($) {\n window.kendo.util = window.kendo.util || {};\n var LRUCache = kendo.Class.extend({\n init: function (size) {\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n put: function (key, value) {\n var map = this._map;\n var entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!this._head) {\n this._head = this._tail = entry;\n } else {\n this._tail.newer = entry;\n entry.older = this._tail;\n this._tail = entry;\n }\n if (this._length >= this._size) {\n map[this._head.key] = null;\n this._head = this._head.newer;\n this._head.older = null;\n } else {\n this._length++;\n }\n },\n get: function (key) {\n var entry = this._map[key];\n if (entry) {\n if (entry === this._head && entry !== this._tail) {\n this._head = entry.newer;\n this._head.older = null;\n }\n if (entry !== this._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = this._tail;\n entry.newer = null;\n this._tail.newer = entry;\n this._tail = entry;\n }\n return entry.value;\n }\n }\n });\n var REPLACE_REGEX = /\\r?\\n|\\r|\\t/g;\n var SPACE = ' ';\n function normalizeText(text) {\n return String(text).replace(REPLACE_REGEX, SPACE);\n }\n function objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n return parts.sort().join('');\n }\n function hashKey(str) {\n var hash = 2166136261;\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n return hash >>> 0;\n }\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var DEFAULT_OPTIONS = { baselineMarkerSize: 1 };\n var defaultMeasureBox;\n if (typeof document !== 'undefined') {\n defaultMeasureBox = document.createElement('div');\n defaultMeasureBox.style.cssText = 'position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;' + 'padding: 0 !important; margin: 0 !important; border: 0 !important;' + 'line-height: normal !important; visibility: hidden !important; white-space: pre!important;';\n }\n var TextMetrics = kendo.Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this.options = $.extend({}, DEFAULT_OPTIONS, options);\n },\n measure: function (text, style, options) {\n if (options === void 0) {\n options = {};\n }\n if (!text) {\n return zeroSize();\n }\n var styleKey = objectKey(style);\n var cacheKey = hashKey(text + styleKey);\n var cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = options.box || defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (typeof value !== 'undefined') {\n measureBox.style[key] = value;\n }\n }\n var textStr = options.normalizeText !== false ? normalizeText(text) : String(text);\n measureBox.textContent = textStr;\n measureBox.appendChild(baselineMarker);\n document.body.appendChild(measureBox);\n if (textStr.length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n measureBox.parentNode.removeChild(measureBox);\n return size;\n },\n _baselineMarker: function () {\n var marker = document.createElement('div');\n marker.style.cssText = 'display: inline-block; vertical-align: baseline;width: ' + this.options.baselineMarkerSize + 'px; height: ' + this.options.baselineMarkerSize + 'px;overflow: hidden;';\n return marker;\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n kendo.deepExtend(kendo.util, {\n LRUCache: LRUCache,\n TextMetrics: TextMetrics,\n measureText: measureText,\n objectKey: objectKey,\n hashKey: hashKey,\n normalizeText: normalizeText\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.gantt.editors', [\n 'kendo.data',\n 'kendo.popup',\n 'kendo.window',\n 'kendo.gantt.data',\n 'kendo.grid',\n 'kendo.datetimepicker',\n 'kendo.numerictextbox'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'gantt.editors',\n name: 'GanttEditors',\n category: 'web',\n description: 'The Gantt component editors.',\n depends: [\n 'data',\n 'popup',\n 'window',\n 'gantt.data',\n 'grid',\n 'datetimepicker',\n 'numerictextbox'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, browser = kendo.support.browser, Observable = kendo.Observable, Widget = ui.Widget, outerWidth = kendo._outerWidth, keys = $.extend({ F10: 121 }, kendo.keys), proxy = $.proxy, extend = $.extend, isPlainObject = $.isPlainObject, NS = '.kendoGantt', PERCENTAGE_FORMAT = 'p0', TABINDEX = 'tabIndex', CLICK = 'click', WIDTH = 'width', STRING = 'string', ARIA_DESCENDANT = 'aria-activedescendant', ACTIVE_OPTION = 'action-option-focused', DOT = '.', DIRECTIONS = {\n 'down': {\n origin: 'bottom left',\n position: 'top left'\n },\n 'up': {\n origin: 'top left',\n position: 'bottom left'\n }\n }, TASK_DROPDOWN_TEMPLATE = kendo.template('
' + '' + '
');\n var ganttStyles = {\n buttonDelete: 'k-gantt-delete',\n buttonCancel: 'k-gantt-cancel',\n buttonSave: 'k-gantt-update',\n focused: 'k-state-focused',\n gridContent: 'k-grid-content',\n hovered: 'k-state-hover',\n item: 'k-item',\n popupWrapper: 'k-list-container',\n popupList: 'k-list k-reset',\n popup: {\n form: 'k-popup-edit-form',\n editForm: 'k-gantt-edit-form',\n formContainer: 'k-edit-form-container',\n resourcesFormContainer: 'k-resources-form-container',\n message: 'k-popup-message',\n buttonsContainer: 'k-edit-buttons k-state-default',\n button: 'k-button',\n editField: 'k-edit-field',\n editLabel: 'k-edit-label',\n resourcesField: 'k-gantt-resources'\n },\n primary: 'k-primary',\n toolbar: { appendButton: 'k-gantt-create' }\n };\n var DATERANGEEDITOR = function (container, options) {\n var attr = {\n name: options.field,\n title: options.title\n };\n var validationRules = options.model.fields[options.field].validation;\n if (validationRules && isPlainObject(validationRules) && validationRules.message) {\n attr[kendo.attr('dateCompare-msg')] = validationRules.message;\n }\n $('').attr(attr).appendTo(container);\n $('').hide().appendTo(container);\n };\n var RESOURCESEDITOR = function (container, options) {\n $('' + options.messages.assignButton + '').click(options.click).appendTo(container);\n };\n var TaskDropDown = Observable.extend({\n init: function (element, options) {\n Observable.fn.init.call(this);\n this.element = element;\n this.options = extend(true, {}, this.options, options);\n this._popup();\n },\n options: {\n direction: 'down',\n navigatable: false\n },\n destroy: function () {\n clearTimeout(this._focusTimeout);\n this.popup.destroy();\n this.element.off(NS);\n this.list.off(NS);\n this.unbind();\n },\n _adjustListWidth: function () {\n var list = this.list;\n var width = list[0].style.width;\n var wrapper = this.element;\n var listOuterWidth = outerWidth(list);\n var computedStyle;\n var computedWidth;\n if (!list.data(WIDTH) && width) {\n return;\n }\n computedStyle = window.getComputedStyle ? window.getComputedStyle(wrapper[0], null) : 0;\n computedWidth = computedStyle ? parseFloat(computedStyle.width) : outerWidth(wrapper);\n if (computedStyle && (browser.mozilla || browser.msie)) {\n computedWidth += parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight) + parseFloat(computedStyle.borderLeftWidth) + parseFloat(computedStyle.borderRightWidth);\n }\n if (list.css('box-sizing') !== 'border-box') {\n width = computedWidth - (outerWidth(list) - list.width());\n } else {\n width = computedWidth;\n }\n if (listOuterWidth > width) {\n width = listOuterWidth;\n }\n list.css({\n fontFamily: wrapper.css('font-family'),\n width: width\n }).data(WIDTH, width);\n },\n _current: function (method) {\n var current = this.list.find(DOT + ganttStyles.focused);\n var sibling = current[method]();\n if (sibling.length) {\n current.removeClass(ganttStyles.focused).removeAttr('id');\n sibling.addClass(ganttStyles.focused).attr('id', ACTIVE_OPTION);\n this.list.find('ul').removeAttr(ARIA_DESCENDANT).attr(ARIA_DESCENDANT, ACTIVE_OPTION);\n }\n },\n _popup: function () {\n var that = this;\n var itemSelector = 'li' + DOT + ganttStyles.item;\n var actions = this.options.messages.actions;\n var navigatable = this.options.navigatable;\n this.list = $(TASK_DROPDOWN_TEMPLATE({\n styles: ganttStyles,\n actions: [\n {\n data: 'add',\n text: actions.addChild\n },\n {\n data: 'insert-before',\n text: actions.insertBefore\n },\n {\n data: 'insert-after',\n text: actions.insertAfter\n }\n ]\n }));\n this.element.append(this.list);\n this.popup = new kendo.ui.Popup(this.list, extend({\n anchor: this.element,\n open: function () {\n that._adjustListWidth();\n },\n animation: this.options.animation\n }, DIRECTIONS[this.options.direction]));\n this.element.on(CLICK + NS, function (e) {\n var target = $(this);\n var action = target.attr(kendo.attr('action'));\n e.preventDefault();\n if (action) {\n that.trigger('command', { type: action });\n } else {\n that.popup.open();\n if (navigatable) {\n that.list.find('li:first').addClass(ganttStyles.focused).attr('id', ACTIVE_OPTION).end().find('ul').attr({\n TABINDEX: 0,\n 'aria-activedescendant': ACTIVE_OPTION\n }).focus();\n }\n }\n });\n this.list.find(itemSelector).hover(function () {\n $(this).addClass(ganttStyles.hovered);\n }, function () {\n $(this).removeClass(ganttStyles.hovered);\n }).end().on(CLICK + NS, itemSelector, function () {\n that.trigger('command', { type: $(this).attr(kendo.attr('action')) });\n that.popup.close();\n });\n if (navigatable) {\n this.popup.bind('close', function () {\n that.list.find(itemSelector).removeClass(ganttStyles.focused).end().find('ul').attr(TABINDEX, 0);\n that.element.parents('[' + kendo.attr('role') + '=\"gantt\"]').find(DOT + ganttStyles.gridContent + ' > table:first').focus();\n });\n this.list.find('ul').on('keydown' + NS, function (e) {\n var key = e.keyCode;\n switch (key) {\n case keys.UP:\n e.preventDefault();\n that._current('prev');\n break;\n case keys.DOWN:\n e.preventDefault();\n that._current('next');\n break;\n case keys.ENTER:\n that.list.find(DOT + ganttStyles.focused).click();\n break;\n case keys.ESC:\n e.preventDefault();\n that.popup.close();\n break;\n }\n });\n }\n }\n });\n var editors = {\n desktop: {\n dateRange: DATERANGEEDITOR,\n resources: RESOURCESEDITOR\n }\n };\n var Editor = kendo.Observable.extend({\n init: function (element, options) {\n kendo.Observable.fn.init.call(this);\n this.element = element;\n this.options = extend(true, {}, this.options, options);\n this.createButton = this.options.createButton;\n },\n fields: function (editors, model, plannedEditors) {\n var that = this;\n var options = this.options;\n var messages = options.messages.editor;\n var resources = options.resources;\n var fields;\n var click = function (e) {\n e.preventDefault();\n resources.editor(that.container.find(DOT + ganttStyles.popup.resourcesField), model);\n };\n if (options.editable.template) {\n fields = $.map(model.fields, function (value, key) {\n return { field: key };\n });\n } else {\n fields = [\n {\n field: 'title',\n title: messages.title\n },\n {\n field: 'start',\n title: messages.start,\n editor: editors.dateRange\n },\n {\n field: 'end',\n title: messages.end,\n editor: editors.dateRange\n },\n {\n field: 'percentComplete',\n title: messages.percentComplete,\n format: PERCENTAGE_FORMAT\n }\n ];\n if (plannedEditors) {\n fields.splice.apply(fields, [\n 1,\n 0\n ].concat([\n {\n field: 'plannedStart',\n title: messages.plannedStart,\n editor: editors.dateRange\n },\n {\n field: 'plannedEnd',\n title: messages.plannedEnd,\n editor: editors.dateRange\n }\n ]));\n }\n if (model.get(resources.field)) {\n fields.push({\n field: resources.field,\n title: messages.resources,\n messages: messages,\n editor: editors.resources,\n click: click,\n styles: ganttStyles.popup\n });\n }\n }\n return fields;\n },\n _buildEditTemplate: function (model, fields, editableFields) {\n var resources = this.options.resources;\n var template = this.options.editable.template;\n var settings = extend({}, kendo.Template, this.options.templateSettings);\n var paramName = settings.paramName;\n var popupStyles = ganttStyles.popup;\n var html = '';\n if (template) {\n if (typeof template === STRING) {\n template = kendo.unescape(template);\n }\n html += kendo.template(template, settings)(model);\n } else {\n for (var i = 0, length = fields.length; i < length; i++) {\n var field = fields[i];\n html += '
';\n if (field.field === resources.field) {\n html += '
';\n }\n if (!model.editable || model.editable(field.field)) {\n editableFields.push(field);\n html += '
';\n } else {\n var tmpl = '#:';\n if (field.field) {\n field = kendo.expr(field.field, paramName);\n tmpl += field + '==null?\\'\\':' + field;\n } else {\n tmpl += '\\'\\'';\n }\n tmpl += '#';\n tmpl = kendo.template(tmpl, settings);\n html += '
' + tmpl(model) + '
';\n }\n }\n }\n return html;\n }\n });\n var PopupEditor = Editor.extend({\n destroy: function () {\n this.close();\n this.unbind();\n },\n close: function () {\n var that = this;\n var destroy = function () {\n if (that.editable) {\n that.editable.destroy();\n that.editable = null;\n that.container = null;\n }\n if (that.popup) {\n that.popup.destroy();\n that.popup = null;\n }\n };\n if (this.editable && this.container.is(':visible')) {\n that.trigger('close', { window: that.container });\n this.container.data('kendoWindow').bind('deactivate', destroy).close();\n } else {\n destroy();\n }\n },\n editTask: function (task, plannedEditors) {\n this.editable = this._createPopupEditor(task, plannedEditors);\n },\n showDialog: function (options) {\n var buttons = options.buttons;\n var popupStyles = ganttStyles.popup;\n var html = kendo.format('

{3}

', popupStyles.form, popupStyles.formContainer, popupStyles.message, options.text, popupStyles.buttonsContainer);\n for (var i = 0, length = buttons.length; i < length; i++) {\n html += this.createButton(buttons[i]);\n }\n html += '
';\n var wrapper = this.element;\n if (this.popup) {\n this.popup.destroy();\n }\n var popup = this.popup = $(html).appendTo(wrapper).eq(0).on('click', DOT + popupStyles.button, function (e) {\n e.preventDefault();\n popup.close();\n var buttonIndex = $(e.currentTarget).index();\n buttons[buttonIndex].click();\n }).kendoWindow({\n modal: true,\n autoFocus: false,\n resizable: false,\n draggable: false,\n title: options.title,\n visible: false,\n deactivate: function () {\n this.destroy();\n wrapper.focus();\n }\n }).getKendoWindow();\n popup.center().open();\n popup.element.find('.k-primary').focus();\n },\n _createPopupEditor: function (task, plannedEditors) {\n var that = this;\n var options = {};\n var messages = this.options.messages;\n var popupStyles = ganttStyles.popup;\n var html = kendo.format('
', kendo.attr('uid'), task.uid, popupStyles.form, popupStyles.editForm, popupStyles.formContainer);\n var fields = this.fields(editors.desktop, task, plannedEditors);\n var editableFields = [];\n html += this._buildEditTemplate(task, fields, editableFields);\n html += '
';\n html += this.createButton({\n name: 'update',\n text: messages.save,\n className: ganttStyles.primary\n });\n html += this.createButton({\n name: 'cancel',\n text: messages.cancel\n });\n if (that.options.editable.destroy !== false) {\n html += this.createButton({\n name: 'delete',\n text: messages.destroy\n });\n }\n html += '
';\n var container = this.container = $(html).appendTo(this.element).eq(0).kendoWindow(extend({\n modal: true,\n resizable: false,\n draggable: true,\n title: messages.editor.editorTitle,\n visible: false,\n close: function (e) {\n if (e.userTriggered) {\n if (that.trigger('cancel', {\n container: container,\n model: task\n })) {\n e.preventDefault();\n }\n }\n }\n }, options));\n var editableWidget = container.kendoEditable({\n fields: editableFields,\n model: task,\n clearContainer: false,\n validateOnBlur: true,\n target: that.options.target\n }).data('kendoEditable');\n kendo.cycleForm(container);\n if (!this.trigger('edit', {\n container: container,\n model: task\n })) {\n container.data('kendoWindow').center().open();\n container.on(CLICK + NS, DOT + ganttStyles.buttonCancel, function (e) {\n e.preventDefault();\n e.stopPropagation();\n that.trigger('cancel', {\n container: container,\n model: task\n });\n });\n container.on(CLICK + NS, DOT + ganttStyles.buttonSave, function (e) {\n e.preventDefault();\n e.stopPropagation();\n var fields = that.fields(editors.desktop, task, plannedEditors);\n var updateInfo = {};\n var field;\n for (var i = 0, length = fields.length; i < length; i++) {\n field = fields[i].field;\n updateInfo[field] = task.get(field);\n }\n that.trigger('save', {\n container: container,\n model: task,\n updateInfo: updateInfo\n });\n });\n container.on(CLICK + NS, DOT + ganttStyles.buttonDelete, function (e) {\n e.preventDefault();\n e.stopPropagation();\n that.trigger('remove', {\n container: container,\n model: task\n });\n });\n } else {\n that.trigger('cancel', {\n container: container,\n model: task\n });\n }\n return editableWidget;\n }\n });\n var ResourceEditor = Widget.extend({\n init: function (element, options) {\n Widget.fn.init.call(this, element, options);\n this.wrapper = this.element;\n this.model = this.options.model;\n this.resourcesField = this.options.resourcesField;\n this.createButton = this.options.createButton;\n this._initContainer();\n this._attachHandlers();\n },\n events: ['save'],\n close: function () {\n this.window.bind('deactivate', proxy(this.destroy, this)).close();\n },\n destroy: function () {\n this._dettachHandlers();\n this.grid.destroy();\n this.grid = null;\n this.window.destroy();\n this.window = null;\n Widget.fn.destroy.call(this);\n kendo.destroy(this.wrapper);\n this.element = this.wrapper = null;\n },\n open: function () {\n this.window.center().open();\n },\n _attachHandlers: function () {\n var grid = this.grid;\n var closeHandler = this._cancelProxy = proxy(this._cancel, this);\n this.container.on(CLICK + NS, DOT + ganttStyles.buttonCancel, this._cancelProxy);\n this._saveProxy = proxy(this._save, this);\n this.container.on(CLICK + NS, DOT + ganttStyles.buttonSave, this._saveProxy);\n this.window.bind('close', function (e) {\n if (e.userTriggered) {\n closeHandler(e);\n }\n });\n grid.wrapper.on(CLICK + NS, 'input[type=\\'checkbox\\']', function () {\n var element = $(this);\n var row = $(element).closest('tr');\n var model = grid.dataSource.getByUid(row.attr(kendo.attr('uid')));\n var value = $(element).is(':checked') ? 1 : '';\n model.set('value', value);\n });\n },\n _cancel: function (e) {\n e.preventDefault();\n this.close();\n },\n _createButtons: function () {\n var buttons = this.options.buttons;\n var html = '
';\n for (var i = 0, length = buttons.length; i < length; i++) {\n html += this.createButton(buttons[i]);\n }\n html += '
';\n this.container.append(html);\n },\n _dettachHandlers: function () {\n this._cancelProxy = null;\n this._saveProxy = null;\n this.container.off(NS);\n this.grid.wrapper.off();\n },\n _initContainer: function () {\n var that = this;\n var popupStyles = ganttStyles.popup;\n var dom = kendo.format('
\"', popupStyles.form, popupStyles.editForm, popupStyles.formContainer, popupStyles.resourcesFormContainer);\n dom = $(dom);\n this.container = dom.find(DOT + popupStyles.resourcesFormContainer);\n this.window = dom.kendoWindow({\n modal: true,\n resizable: false,\n draggable: true,\n visible: false,\n title: this.options.messages.resourcesEditorTitle,\n open: function () {\n that.grid.resize(true);\n }\n }).data('kendoWindow');\n this._resourceGrid();\n this._createButtons();\n },\n _resourceGrid: function () {\n var that = this;\n var messages = this.options.messages;\n var element = $('
').appendTo(this.container);\n this.grid = new kendo.ui.Grid(element, {\n columns: [\n {\n field: 'name',\n title: messages.resourcesHeader,\n template: '