Lines Matching refs:item

627             var item = instances[i];
629 if (item === Error ||
630 (item != null && item.prototype instanceof Error)) {
631 if (e instanceof item) {
634 } else if (typeof item === "function") {
635 var matchesPredicate = tryCatch(item).call(boundTo, e);
642 var keys = getKeys(item);
645 if (item[key] != e[key]) {
2085 var item = arguments[i];
2086 if (util.isObject(item)) {
2087 catchInstances[j++] = item;
2091 + "expecting an object but got " + util.classString(item)
2795 var item = arguments[i];
2796 if (util.isObject(item)) {
2797 catchInstances[j++] = item;
2800 "expecting an object but got " + util.classString(item));
4946 var item = this[i];
4947 if (item instanceof Promise) {
4948 item.cancel();
5883 exports.enroll = function(item, msecs) { argument
5884 clearTimeout(item._idleTimeoutId);
5885 item._idleTimeout = msecs;
5888 exports.unenroll = function(item) { argument
5889 clearTimeout(item._idleTimeoutId);
5890 item._idleTimeout = -1;
5893 exports._unrefActive = exports.active = function(item) {
5894 clearTimeout(item._idleTimeoutId);
5896 var msecs = item._idleTimeout;
5898 item._idleTimeoutId = setTimeout(function onTimeout() {
5899 if (item._onTimeout)
5900 item._onTimeout();
7584 timeline_cell_class: function (item, date) { argument
7594 grid_indent: function (item) { argument
7597 grid_folder: function (item) { argument
7598 …return "<div class='gantt_tree_icon gantt_folder_" + (item.$open ? "open" : "closed") + "'></div>";
7600 grid_file: function (item) { argument
7603 grid_open: function (item) { argument
7604 return "<div class='gantt_tree_icon gantt_" + (item.$open ? "close" : "open") + "'></div>";
7606 grid_blank: function (item) { argument
7609 date_grid: function (date, item, column) { argument
7610 if (item && gantt.isUnscheduledTask(item) && gantt.config.show_unscheduled) {
7611 return gantt.templates.task_unscheduled_time(item);
7749 gantt._defaultTaskDate = function (item, parent_id) { argument
7757 task:item
7767 task:item
7774 task:item
7787 gantt.createTask = function (item, parent, index) { argument
7788 item = item || {};
7790 if (!gantt.defined(item.id))
7791 item.id = gantt.uid();
7793 if (!item.start_date) {
7794 item.start_date = gantt._defaultTaskDate(item, parent);
7796 if (item.text === undefined) {
7797 item.text = gantt.locale.labels.new_task;
7799 if (item.duration === undefined) {
7800 item.duration = 1;
7804 this.setParent(item, parent, true);
7809 if (!this.callEvent("onTaskCreated", [item])) {
7813 item.$new = true;
7815 gantt.$data.tasksStore.addItem(item, index);
7817 this.selectTask(item.id);
7819 this.showLightbox(item.id);
7821 if (this.addTask(item, parent, index)) {
7822 this.showTask(item.id);
7823 this.selectTask(item.id);
7826 return item.id;
8861 DataProcessor.prototype.storeItem = function (item) { argument
8862 this._storage.storeItem(item);
9200 this._dataProcessorHandlers.push(gantt.attachEvent("onAfterTaskAdd", function (id, item) { argument
9206 … this._dataProcessorHandlers.push(gantt.attachEvent("onAfterTaskUpdate", function (id, item) { argument
9212 gantt._sendTaskOrder(id, item);
9216 … this._dataProcessorHandlers.push(gantt.attachEvent("onBeforeTaskDelete", function (id, item) { argument
9226 … this._dataProcessorHandlers.push(gantt.attachEvent("onAfterTaskDelete", function (id, item) { argument
9257 dp.storeItem(item);
9263 … this._dataProcessorHandlers.push(gantt.attachEvent("onAfterLinkUpdate", function (id, item) { argument
9269 this._dataProcessorHandlers.push(gantt.attachEvent("onAfterLinkAdd", function (id, item) { argument
9275 … this._dataProcessorHandlers.push(gantt.attachEvent("onAfterLinkDelete", function (id, item) { argument
9281 dp.storeItem(item);
9301 var item = this.getTask(newId);
9302 var itemLinks = getTaskLinks(item);
9466 gantt._sendTaskOrder = function (id, item) { argument
9467 if (item.$drop_target) {
9469 this.getTask(id).target = item.$drop_target;
9519 this.storeItem = function (item) { argument
9520 _this._storage[item.id] = utils.copy(item);
9563 var item = null,
9566 item = data[i];
9568 item = this.$initItem(utils.copy(item));
9570 if(this.callEvent("onItemLoading", [item])){
9571 if (!this.pull.hasOwnProperty(item.id)) {
9572 this.fullOrder.push(item.id);
9574 loaded.push(item);
9575 this.pull[item.id] = item;
9594 updateItem: function(id, item){ argument
9595 if (!utils.defined(item)) item = this.getItem(id);
9598 if (this.callEvent("onBeforeUpdate", [item.id, item]) === false) return false;
9600 this.pull[id]=item;
9602 this.callEvent("onAfterUpdate", [item.id, item]);
9603 this.callEvent("onStoreUpdated", [item.id, item, "update"]);
9632 _addItemInner: function(item, index){ argument
9636 if(this.exists(item.id)){
9637 this.silent(function(){this.updateItem(item.id, item);});
9656 this.pull[item.id]=item;
9659 if(this.$find(item.id) === -1)
9660 this.$insertAt(item.id,index);
9675 addItem: function(item, index){ argument
9676 if (!utils.defined(item.id))
9677 item.id = utils.uid();
9680 item = this.$initItem(item);
9684 if (this.callEvent("onBeforeAdd", [item.id, item]) === false) return false;
9688 this._addItemInner(item, index);
9691 this.callEvent("onAfterAdd",[item.id, item]);
9693 this.callEvent("onStoreUpdated",[item.id,item,"add"]);
9695 return item.id;
9824 var item = this.pull[this.fullOrder[i]];
9825 code.call(this, item);
9832 this.eachItem(function(item){ argument
9833 if(this.callEvent("onFilterItem", [item.id, item])){
9834 filteredOrder.push(item.id);
9947 var item = order[i];
9948 item.$index = i;
9949 gantt.resetProjectDates(item);
10002 tasksStore.attachEvent("onStoreUpdated", function(id, item, action){ argument
10084 gantt.attachEvent("onBeforeTaskDelete", function(id, item){ argument
10089 gantt.attachEvent("onAfterTaskDelete", function(id, item) { argument
10297 var item = store.getItem(id);
10298 if(item && store.isVisible(id)) {
10300 renders[i].render_item(item);
10323 store.attachEvent("onStoreUpdated", function(id, item, action){ argument
10341 store.attachEvent("onStoreUpdated", function(id, item, action){ argument
10354 store.callEvent("onBeforeRefreshItem", [item.id]);
10355 itemRepainter.renderItem(item.id, renderer);
10356 store.callEvent("onAfterRefreshItem", [item.id]);
10371 function refreshId(renders, oldId, newId, item) { argument
10591 this.attachEvent("onFilterItem", function(id, item){ argument
10601 }, item);
10611 var item = null;
10614 item = data[i];
10615 this.setParent(item, this.getParent(item) || rootId);
10620 item = data[i];
10621 this._add_branch(item);
10622 item.$level = this.calculateItemLevel(item);
10624 if (!utils.defined(item.$open)) {
10625 item.$open = utils.defined(item.open) ? item.open : this.$openInitially();
10631 _isSplitItem: function(item){ argument
10632 return (item.render == "split" && this.hasChild(item.id));
10642 _addItemInner: function(item, index){ argument
10644 var parent = this.getParent(item);
10648 this.setParent(item, parent);
10657 DataStore.prototype._addItemInner.call(this, item, targetIndex); argument
10658 this.setParent(item, parent);
10660 if(item.hasOwnProperty("$rendered_parent")){
10661 this._move_branch(item, item.$rendered_parent);
10663 this._add_branch(item, index);
10765 this.eachItem(function(item){ argument
10766 item.$level += diff;
10800 var item = this.getItem(childId);
10804 if(parent.$level >= item.$level){
10808 while (item && this.exists(pid)) {
10809 item = this.getItem(pid);
10811 if (item && item.id == parentId)
10813 pid = this.getParent(item);
10843 var item = null;
10845 item = id;
10847 item = this.getItem(id);
10851 if(item){
10852 parent = item[this.$parentProperty];
10865 calculateItemLevel: function(item){ argument
10869 }, item);
10873 _setParentInner: function(item, new_pid, silent){ argument
10875 if(item.hasOwnProperty("$rendered_parent")){
10876 this._move_branch(item, item.$rendered_parent, new_pid);
10878 this._move_branch(item, item[this.$parentProperty], new_pid);
10882 setParent: function(item, new_pid, silent){ argument
10883 this._setParentInner(item, new_pid, silent);
10885 item[this.$parentProperty] = new_pid;
10894 var item = this.pull[branch[i]];
10895 code.call(this, item);
10896 if (this.hasChild(item.id))
10897 this.eachItem(code, item.id);
10902 var item = startItem;
10903 var parent = this.getParent(item);
10910 item = this.getItem(parent);
10911 code.call(this, item);
10912 parent = this.getParent(item);
10915 _add_branch: function(item, index, parent){ argument
10916 var pid = parent === undefined ? this.getParent(item) : parent;
10922 if(branch[i] == item.id){
10930 branch.splice(index, 0, item.id);
10932 branch.push(item.id);
10935 item.$rendered_parent = pid;
10938 _move_branch: function(item, old_parent, new_parent){ argument
10941 this._replace_branch_child(old_parent, item.id);
10944 this._add_branch(item, undefined, new_parent);
10946 delete this._branches[item.id];
10948 item.$level = this.calculateItemLevel(item);
10951 }, item.id);
11402 updateTask: function (id, item) {
11403 if (!utils.defined(item)) item = this.getTask(id);
11404 this.$data.tasksStore.updateItem(id, item);
11408 addTask: function (item, parent, index) {
11409 if (!utils.defined(item.id))
11410 item.id = utils.uid();
11412 if (!utils.defined(parent)) parent = this.getParent(item) || 0;
11414 this.setParent(item, parent);
11416 return this.$data.tasksStore.addItem(item, index, parent);
11463 calculateTaskLevel: function (item) {
11464 return this.$data.tasksStore.calculateItemLevel(item);
15721 var item = gantt.getTask(id);
15722 if(item.type == gantt.config.types.placeholder) {
15723 if(item.start_date && item.end_date && item.unscheduled){
15724 item.unscheduled = false;
15728 var newTask = gantt.copy(item);
15730 gantt.deleteTask(item.id);
16893 gantt.isReadonly = function (item) { argument
16894 if (item && item[this.config.editable_property]) {
16897 return (item && item[this.config.readonly_property]) || this.config.readonly;
17278 function(itemId, item){ argument
17281 if(layers.filters[i](itemId, item) === false){
17319 filter: function(item){ argument
17612 var item = store.getItem(itemId);
17618 var value = item[editorConfig.map_to];
17642 var item = gantt.getTask(this._itemId);
17643 var value = item[editorConfig.map_to];
17700 var item = store.getItem(itemId);
17714 item[mapTo] = value;
17715 updateTaskDateProperties(item, mapTo, gantt.config.inline_editors_date_processing);
18668 return function processTaskDateProperties(item, mapTo, mode) { argument
18670 keepDatesOnEdit(item, mapTo);
18672 keepDurationOnEdit(item, mapTo);
18674 defaultActionOnEdit(item, mapTo);
18680 function keepDatesOnEdit(item, mapTo) { argument
18682 item.end_date = gantt.calculateEndDate(item);
18684 item.duration = gantt.calculateDuration(item);
18691 function keepDurationOnEdit(item, mapTo) { argument
18693 item.start_date = gantt.calculateEndDate({
18694 start_date: item.end_date,
18695 duration: -item.duration,
18696 task: item
18700 item.end_date = gantt.calculateEndDate(item);
18707 function defaultActionOnEdit(item, mapTo) { argument
18709 item.end_date = gantt.calculateEndDate(item);
18711 item.duration = gantt.calculateDuration(item);
19495 var item = {};
19496 this.createTask(item, id ? id : gantt.config.root_id);
19674 var item = store.getItem(dnd.config.id);
19676 var el = dnd._getTaskByY(targetY, store.getIndexById(item.id));
19679 el = dnd.lastTaskOfLevel(config.order_branch_free ? item.$level : 0);
19685 function allowedLevel(next, item) { argument
19686 …return (!(store.isChildOf(over.id, item.id)) && (next.$level == item.$level || config.order_branch…
19698 if (next.id != item.id) {
19703 if (!(store.isChildOf(item.id, over.id) && store.getChildren(over.id).length == 1))
19706 store.move(item.id, store.getBranchIndex(over.id) + 1, store.getParent(over.id));
19719 if (allowedLevel(next, item) && next.id != item.id) {
19720 store.move(item.id, -1, store.getParent(next.id));
19726 if (over.id != item.id && allowedLevel(over, item)) {
19729 store.move(item.id, -1, over.id);
19749 if (item.id == over.id) return;
19751 if (allowedLevel(over, item) && item.id != over.id) {
19752 store.move(item.id, 0, 0, over.id);
19754 } else if (over.$level == item.$level - 1 && !store.getChildren(over.id).length) {
19755 store.move(item.id, 0, over.id);
19757 } else if (prev && (allowedLevel(prev, item)) && (item.id != prev.id)) {
19758 store.move(item.id, -1, store.getParent(prev.id));
23428 render_item: function (item, container, viewPort) { argument
23432 if (!filter(item)) {
23433 this.remove_item(item.id);
23446 if(isInViewPort(rendererViewPort, getRectangle(item, view, gantt))){
23447 dom = renderMethod.call(gantt, item, view, rendererViewPort);
23450 dom = renderMethod.call(gantt, item, view, rendererViewPort);
23452 this.append(item, dom, container);
23508 var item = items[i];
23509 var itemNode = this.rendered[item.id];
23511 if (!isInViewPort(viewPort, getRectangle(item, view, gantt))) {
23512 this.hide(item.id);
23515 updateMethod.call(gantt, item, itemNode, view, viewPort);
23517 this.restore(item);
23527 append: function (item, node, container) { argument
23533 if (this.rendered[item.id]) {
23534 this.remove_item(item.id);
23539 if (this.rendered[item.id] && this.rendered[item.id].parentNode) {
23540 this.replace_item(item.id, node);
23544 this.rendered[item.id] = node;
23548 var item = this.rendered[item_id];
23549 if (item && item.parentNode) {
23550 item.parentNode.replaceChild(newNode, item);
23559 var item = this.rendered[item_id];
23560 if (item && item.parentNode) {
23561 item.parentNode.removeChild(item);
23564 restore: function (item) { argument
23565 var dom = this.rendered[item.id];
23568 this.append(item, dom, node);
23571 this.render_item(item, node);
24012 function isRendered(item, columnIndex){ argument
24013 if(renderedCells[item.id][columnIndex] && renderedCells[item.id][columnIndex].parentNode){
24042 function renderCells(item, node, view, viewPort){ argument
24049 if(!renderedCells[item.id]){
24050 renderedCells[item.id] = {};
24052 if(!visibleCells[item.id]){
24053 visibleCells[item.id] = {};
24058 for(var i in visibleCells[item.id]){
24059 var index = visibleCells[item.id][i];
24062 detachRenderedCell(item.id, index);
24065 visibleCells[item.id] = {};
24068 var cell = renderOneCell(cfg, columnIndex, item, viewPort, count, cssTemplate, config);
24069 if(!cell && isRendered(item, columnIndex)){
24070 detachRenderedCell(item.id, columnIndex);
24091 function renderOneCell(scale, columnIndex, item, viewPort, count, cssTemplate, config){ argument
24097 var cssTemplateContent = cssTemplate(item, scale.trace_x[columnIndex]);
24106 if(renderedCells[item.id][columnIndex]){
24107 visibleCells[item.id][columnIndex] = columnIndex;
24108 return renderedCells[item.id][columnIndex];
24121 renderedCells[item.id][columnIndex] = cell;
24122 visibleCells[item.id][columnIndex] = columnIndex;
24129 function _render_bg_line(item, view, viewPort) { argument
24154 renderedCells[item.id] = {};
24155 visibleCells[item.id] = {};
24157 var cell = renderOneCell(cfg, columnIndex, item, viewPort, count, cellTemplate, config);
24163 var odd = gantt.getGlobalTaskIndex(item.id) % 2 !== 0;
24164 var cssTemplate = templates.task_row_class(item.start_date, item.end_date, item);
24168 if(store.isSelected(item.id)) {
24176 row.style.top = view.getItemTop(item.id) + "px";
24184 row.setAttribute(view.$config.item_attribute, item.id);
24214 function _render_grid_item(item, view, viewport) { argument
24241 value = col.template(item);
24243 value = item[col.name];
24246 value = templates.date_grid(value, item, col.name);
24260 for (var j = 0; j < item.$level; j++)
24261 tree.push(templates.grid_indent(item));
24263 …has_child = store.hasChild(item.id) && !(gantt.isSplitTask(item) && !gantt.config.open_split_tasks…
24265 tree.push(templates.grid_open(item));
24266 tree.push(templates.grid_folder(item));
24268 tree.push(templates.grid_blank(item));
24269 tree.push(templates.grid_file(item));
24276 var aria = gantt._waiAria.gridCellAttrString(col, textValue, item);
24285 var css = gantt.getGlobalTaskIndex(item.id) % 2 === 0 ? "" : " odd";
24286 css += (item.$transparent) ? " gantt_transparent" : "";
24288 css += (item.$dataprocessor_class ? " " + item.$dataprocessor_class : "");
24291 var css_template = templates.grid_row_class.call(gantt, item.start_date, item.end_date, item);
24296 if(store.isSelected(item.id)) {
24301 el.className = "gantt_row" + css + " gantt_row_" + gantt.getTaskType(item.type);
24309 el.style.top = view.getItemTop(item.id) + "px";
24313 el.setAttribute(view.$config.item_attribute, item.id);
24316 gantt._waiAria.taskRowAttr(item, el);
24390 module.exports = function(item, view){
24391 if(!item.start_date || !item.end_date){
24395 var startCoord = view.posFromDate(item.start_date);
24396 var endCoord = view.posFromDate(item.end_date);
24401 top: view.getItemTop(item.id),
24417 module.exports = function(item, view){
24421 top: view.getItemTop(item.id),
24437 module.exports = function(item, view){
24439 top: view.getItemTop(item.id),
24440 height: view.getItemHeight(item.id),
24459 module.exports = function getLinkBox(item, view, gantt){ argument
24460 if(!gantt.isTaskExists(item.source)){
24464 if(!gantt.isTaskExists(item.target)){
24467 var sourceBox = barRectangle(gantt.getTask(item.source), view, gantt);
24468 var targetBox = barRectangle(gantt.getTask(item.target), view, gantt);
26490 this._staticBgHandler = store.attachEvent("onStoreUpdated", function(id, item, mode){ argument
26922 var low = 0, high = array.length - 1, i, item, prev;
26926 item = +array[i];
26928 if (item < target) {
26932 if (item > target) {
29744 return arrayFilter(arr, function(item, i) { argument
29745 return !callback(item, i);