Commit 58a58956 by kevalbhatt

ATLAS-3624 : Beta UI : Allow user to add mutlti-valued attributes in namespaces

parent 91d2b8ea
......@@ -24,8 +24,19 @@
}
.namespace-tree-child {
padding-left: 20px;
&.entity-detail-table table {
td {
&:nth-child(1) {
width: 35%;
}
word-break: break-all;
}
}
padding-left: 5px;
margin-top: 10px;
font-weight: 100;
}
}
......@@ -61,8 +72,8 @@
.expandable .attr-details {
max-height: 300px;
overflow: auto;
margin-left: 100px;
width: calc(100% - 100px);
margin-left: 30px;
width: calc(100% - 30px);
}
}
......@@ -124,7 +135,6 @@
.name-space-details {
.backgrid {
td.expandable-content {
width: 100%;
max-width: none;
background: #f8f8f8;
......
......@@ -77,7 +77,11 @@
</div>
</div>
<div class="col-md-6">
<div id="r_entityUserDefineView"></div>
<div id="r_entityUserDefineView">
<div class="fontLoader-relative">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
<div id="r_entityLabelDefineView"></div>
<div id="r_entityNameSpaceView"></div>
</div>
......
......@@ -44,12 +44,12 @@
</select>
</div>
</div>
<!-- <div class="form-group" data-id="multiValueSelect">
<div class="form-group" data-id="multiValueSelect">
<label class="control-label col-sm-3" for="multiValSelect">Enable Multivalues</label>
<div class="col-sm-8">
<input type="checkbox" class="form-check-input multi-value-select" data-id="multiValueSelectStatus">
</div>
</div> -->
</div>
<div class="form-group enumtype-container" data-id="enumTypeSelectorContainer">
<div class="">
<label class="control-label col-sm-3 required" for="enumType">Enum Name</label>
......
......@@ -42,7 +42,7 @@
</tr>
</table>
<ul class="dropdown-menu pull-right multi-level" role="menu" aria-labelledby="dropdownMenu">
<li><a href="#!/administrator" data-id="purgeSearch">Administration</a></li>
<li><a href="javascript:void(0)" data-id='administrator'>Administration</a></li>
<li class="dropdown-submenu">
<a tabindex="-1" href="javascript:void(0)"> Help </span></a>
<ul class="dropdown-menu">
......
......@@ -28,7 +28,8 @@ define(['require'], function(require) {
stateChanged: false,
tagUrl: "#!/tag",
searchUrl: "#!/search",
glossaryUrl: "#!/glossary"
glossaryUrl: "#!/glossary",
administratorUrl: "#!/administrator"
},
detailPageState: {}
};
......
......@@ -340,6 +340,8 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
urlUpdate['searchUrl'] = options.url;
} else if (Utils.getUrlState.isGlossaryTab(options.url)) {
urlUpdate['glossaryUrl'] = options.url;
} else if (Utils.getUrlState.isAdministratorTab(options.url)) {
urlUpdate['administratorUrl'] = options.url;
}
$.extend(Globals.saveApplicationState.tabState, urlUpdate);
}
......@@ -561,6 +563,8 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
urlPath = "tagUrl";
} else if (queryParams.from == "glossary") {
urlPath = "glossaryUrl";
} else if (queryParams.from == "namespace") {
urlPath = "administratorUrl";
}
}
Utils.setUrl({
......
......@@ -67,7 +67,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'value', 'guid', 'entity', 'entityName', 'attributeDefs', 'nameSpaceCollection', 'enumDefCollection'));
_.extend(this, _.pick(options, 'value', 'guid', 'entity', 'entityName', 'attributeDefs', 'entityDefCollection', 'nameSpaceCollection', 'enumDefCollection'));
},
onShow: function() {
......@@ -87,7 +87,7 @@ define(['require',
renderNameSpaceLayoutView: function(obj) {
var that = this;
require(['views/name_space/NameSpaceTableLayoutView'], function(NameSpaceTableLayoutView) {
that.RNamespaceTableLayoutView.show(new NameSpaceTableLayoutView({ nameSpaceCollection: that.nameSpaceCollection }));
that.RNamespaceTableLayoutView.show(new NameSpaceTableLayoutView({ nameSpaceCollection: that.nameSpaceCollection, entityDefCollection: that.entityDefCollection }));
});
},
renderEnumLayoutView: function(obj) {
......
......@@ -185,6 +185,7 @@ define(['require',
cell: "html",
editable: false,
sortable: false,
fixWidth: "20",
cell: Backgrid.ExpandableCell,
accordion: false,
expand: function(el, model) {
......
......@@ -245,7 +245,7 @@ define(['require',
enumDefCollection: this.enumDefCollection,
classificationDefCollection: this.classificationDefCollection,
glossaryCollection: this.glossaryCollection,
nameSpaceCollection: this.nameSpaceCollection,
nameSpaceCollection: this.activeEntityDef.get('namespaceAttributeDefs'),
searchVent: this.searchVent,
attributeDefs: (function() {
return that.getEntityDef(collectionJSON);
......@@ -255,7 +255,9 @@ define(['require',
this.renderEntityDetailTableLayoutView(obj);
this.renderEntityUserDefineView(obj);
this.renderEntityLabelDefineView(obj);
if (obj.nameSpaceCollection) {
this.renderEntityNameSpaceView(obj);
}
this.renderRelationshipLayoutView(obj);
this.renderAuditTableLayoutView(obj);
this.renderTagTableLayoutView(obj);
......
......@@ -62,39 +62,21 @@ define([
initialize: function(options) {
var that = this;
_.extend(this, _.pick(options, "entity", "nameSpaceCollection", "enumDefCollection", "guid", "fetchCollection"));
this.editMode - false;
this.editMode = false;
this.$("editBox").hide();
var nameSpaceSet = {};
this.treeData = [];
this.actualCollection = new Backbone.Collection(
_.map(this.entity.namespaceAttributes, function(val, key) {
var foundNameSpace = that.nameSpaceCollection.fullCollection.find({ name: key });
var tempData = {
text: key,
name: key,
parent: "#",
icon: "fa fa-folder-o",
children: []
}
var foundNameSpace = that.nameSpaceCollection[key];
if (foundNameSpace) {
var attributeDefs = foundNameSpace.get("attributeDefs");
_.each(val, function(aVal, aKey) {
var foundAttr = _.find(attributeDefs, function(o) {
var foundAttr = _.find(foundNameSpace, function(o) {
return o.name === aKey
});
if (foundAttr) {
var treVal = aKey + " : " + (foundAttr.typeName === "date" ? moment(aVal).format("MM/DD/YYYY") : aVal);
tempData.children.push({
text: treVal,
name: treVal,
icon: "fa fa-file-o",
children: []
})
val[aKey] = { value: aVal, typeName: foundAttr.typeName };
}
})
}
that.treeData.push(tempData);
return _.extend({}, val, { __internal_UI_nameSpaceName: key });
}));
this.collection = new Backbone.Collection();
......@@ -230,22 +212,38 @@ define([
var modelObj = { isNew: true };
this.collection.unshift(modelObj);
},
generateTree: function() {
this.ui.namespaceTree.jstree({
plugins: ["core", "sort", "changed", "wholerow", "conditionalselect"],
conditionalselect: function(node) {
return false;
},
state: { opened: true, selected: false },
core: {
multiple: false,
data: this.treeData
renderNamespace: function() {
var li = ""
this.actualCollection.forEach(function(obj) {
var attrLi = "";
_.each(obj.attributes, function(val, key) {
if (key !== "__internal_UI_nameSpaceName") {
var newVal = val;
if (_.isObject(val) && !_.isUndefinedNull(val.value)) {
newVal = val.value;
if (newVal.length > 0 && val.typeName.indexOf("date") > -1) {
newVal = _.map(newVal, function(dates) {
return moment(dates).format("MM/DD/YYYY");
});
}
})
if (val.typeName === "date") {
newVal = moment(newVal).format("MM/DD/YYYY");
}
}
attrLi += "<tr><td>" + _.escape(key) + " (" + _.escape(val.typeName) + ")</td><td>" + _.escape(newVal) + "</td></tr>";
}
});
li += "<ul class='namespace-tree-parent'><li class='table'>" + _.escape(obj.get("__internal_UI_nameSpaceName")) + "</li>" +
"<li class='namespace-tree-child entity-detail-table'>" +
"<table class='table'>" + attrLi + "</table>" +
"</li></ul>";
});
this.ui.namespaceTree.html(li);
},
onRender: function() {
this.panelOpenClose();
this.generateTree();
this.renderNamespace();
}
});
});
\ No newline at end of file
......@@ -349,10 +349,8 @@ define(['require',
}
if (isMultiCheck) {
obj.multiValued = true;
if (obj.typeName == "string" || obj.typeName == "int" || obj.typeName == "float") {
obj.typeName = "array<" + obj.typeName + ">";
}
}
});
var notifyObj = {
modal: true,
......@@ -489,10 +487,8 @@ define(['require',
}
if (isMultiCheck) {
obj.multiValued = true;
if (obj.typeName == "string" || obj.typeName == "int" || obj.typeName == "float") {
obj.typeName = "array<" + obj.typeName + ">";
}
}
});
var notifyObj = {
......
......@@ -70,6 +70,7 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
this.ui.enumCancleBtn.attr("disabled", "true");
};
events["click " + this.ui.enumOkBtn] = function(e) {
this.ui.enumCancleBtn.attr("disabled", "true");
this.onUpdateEnum();
};
return events;
......@@ -173,6 +174,9 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
return;
}
this.ui.enumOkBtn.attr("disabled", "true");
this.ui.enumSelector.attr("disabled", "true");
this.ui.valueSelector.attr("disabled", "true");
this.ui.enumCancleBtn.attr("disabled", "true");
if (enumName) {
var enumDef = enumName.get("elementDefs");
if (enumDef.length === selectedEnumValues.length) {
......@@ -231,6 +235,8 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
complete: function(model, status) {
that.emumTypeSelectDisplay();
that.ui.enumOkBtn.removeAttr("disabled");
that.ui.enumSelector.removeAttr("disabled");
that.ui.valueSelector.removeAttr("disabled");
if (that.options.closeModal) {
that.options.closeModal();
}
......@@ -246,6 +252,8 @@ define(["require", "backbone", "hbs!tmpl/name_space/EnumCreateUpdateItemView_tmp
content: "No updated values"
});
that.ui.enumOkBtn.removeAttr("disabled");
that.ui.enumSelector.removeAttr("disabled");
that.ui.valueSelector.removeAttr("disabled");
if (that.options.closeModal) {
that.options.closeModal();
}
......
......@@ -63,7 +63,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'guid', 'entity', 'entityName', 'attributeDefs', 'typeHeaders', 'nameSpaceCollection', 'nameSpaceAttr'));
_.extend(this, _.pick(options, 'guid', 'entity', 'entityName', 'attributeDefs', 'typeHeaders', 'nameSpaceCollection', 'nameSpaceAttr', 'entityDefCollection'));
this.commonTableOptions = {
collection: this.nameSpaceAttr,
includeFilter: false,
......@@ -141,6 +141,7 @@ define(['require',
that.renderTableLayoutView();
that.showDetails = true;
that.toggleNamespaceDetailsAttrView();
that.entityDefCollection.fetch({ silent: true });
},
parent: that.$el,
tagCollection: that.nameSpaceCollection,
......@@ -189,7 +190,7 @@ define(['require',
})
},
typeName: {
label: "typeName",
label: "Type Name",
cell: "html",
editable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
......
......@@ -57,9 +57,7 @@ define(['require',
this.model.set({ "name": e.target.value.trim() });
};
events["change " + this.ui.dataTypeSelector] = function(e) {
//this.ui.multiValueSelect.hide();
if (e.target.value.trim() === 'enumeration' || e.target.value.trim() === 'Enumeration') {
// this.model.set({ "typeName": "enum" });
this.ui.enumTypeSelectorContainer.show();
this.emumTypeSelectDisplay();
this.ui.stringLengthContainer.hide();
......@@ -67,13 +65,9 @@ define(['require',
this.model.set({ "typeName": e.target.value.trim() });
this.model.set({ "enumValues": null });
this.ui.stringLengthContainer.show();
//this.ui.multiValueSelect.show();
this.ui.enumTypeSelectorContainer.hide();
this.ui.enumValueSelectorContainer.hide();
} else {
// if (e.target.value.trim() === 'int' || e.target.value.trim() === 'float') {
// this.ui.multiValueSelect.show();
// }
this.model.set({ "typeName": e.target.value.trim() });
this.model.set({ "enumValues": null });
this.ui.enumTypeSelectorContainer.hide();
......@@ -101,9 +95,9 @@ define(['require',
events["change " + this.ui.enumValueSelector] = function(e) {
this.model.set({ "enumValues": this.ui.enumValueSelector.val() });
};
// events["change " + this.ui.multiValueSelectStatus] = function(e) {
// this.model.set({ "multiValueSelect": e.target.checked });
// };
events["change " + this.ui.multiValueSelectStatus] = function(e) {
this.model.set({ "multiValueSelect": e.target.checked });
};
events["click " + this.ui.close] = 'onCloseButton';
events["click " + this.ui.createNewEnum] = 'onCreateUpdateEnum';
return events;
......@@ -150,7 +144,7 @@ define(['require',
this.ui.attributeInput.attr("disabled", "false");
this.ui.dataTypeSelector.attr("disabled", "false");
this.ui.dataTypeSelector.attr("disabled", "false");
//this.ui.multiValueSelect.hide();
this.ui.multiValueSelect.hide();
this.ui.dataTypeSelector.val(this.parentView.attrDetails.attrTypeName);
if (this.parentView.attrDetails.attrTypeName == "string") {
this.ui.stringLengthContainer.show();
......@@ -176,11 +170,11 @@ define(['require',
this.ui.enumTypeSelector.val(typeName).trigger('change');
}
}
// if (this.parentView.attrDetails.multiValued) {
// this.ui.multiValueSelect.show();
// $(this.ui.multiValueSelectStatus).prop('checked', true).trigger('change');
// this.ui.multiValueSelectStatus.attr("disabled", "false");
// }
if (this.parentView.attrDetails && this.parentView.attrDetails.multiValued) {
this.ui.multiValueSelect.show();
$(this.ui.multiValueSelectStatus).prop('checked', true).trigger('change');
this.ui.multiValueSelectStatus.attr("disabled", "false");
}
}
},
showEnumValues: function(enumName) {
......
......@@ -106,7 +106,8 @@ define([
guid: that.options.namespaceID,
typeHeaders: that.typeHeaders,
enumDefCollection: that.enumDefCollection,
selectedNameSpace:that.selectedNameSpace
selectedNameSpace: that.selectedNameSpace,
entityDefCollection: that.options.entityDefCollection
}));
});
}
......
......@@ -79,7 +79,7 @@ define(['require',
* @constructs
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'guid', 'entity', 'entityName', 'attributeDefs', 'typeHeaders', 'nameSpaceCollection', 'nameSpaceAttr', 'selectedNameSpace'));
_.extend(this, _.pick(options, 'guid', 'entity', 'entityName', 'attributeDefs', 'typeHeaders', 'nameSpaceCollection', 'entityDefCollection', 'nameSpaceAttr', 'selectedNameSpace'));
this.limit = 10;
this.offset = 0;
this.pervOld = [];
......@@ -188,6 +188,7 @@ define(['require',
enumDefCollection.fetch({ reset: true });
that.showDetails = true;
that.toggleNamespaceDetailsAttrView();
that.entityDefCollection.fetch({ silent: true });
},
parent: that.$el,
tagCollection: that.nameSpaceCollection,
......@@ -224,6 +225,7 @@ define(['require',
enumDefCollection.fetch({ reset: true });
that.showDetails = true;
that.toggleNamespaceDetailsAttrView();
that.entityDefCollection.fetch({ silent: true });
},
tagCollection: that.nameSpaceCollection,
enumDefCollection: enumDefCollection,
......@@ -256,7 +258,7 @@ define(['require',
editable: false,
sortable: false,
cell: Backgrid.ExpandableCell,
fixWidth: "50",
fixWidth: "20",
accordion: false,
alwaysVisible: true,
expand: function(el, model) {
......@@ -298,7 +300,7 @@ define(['require',
editable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
return '<a title= "' + model.get('name') + '" href ="#!/administrator/namespace/' + model.get('guid') + '">' + model.get('name') + '</a>';
return '<a title= "' + model.get('name') + '" href ="#!/administrator/namespace/' + model.get('guid') + '?from=namespace">' + model.get('name') + '</a>';
}
})
},
......
......@@ -63,6 +63,7 @@ define(['require',
'classificationDefCollection',
'nameSpaceCollection',
'tag',
'type',
'searchTableFilters',
'systemAttrArr'));
this.attrObj = _.sortBy(this.attrObj, 'name');
......@@ -365,29 +366,28 @@ define(['require',
filters.push(returnObj);
}
});
if (this.attrObj.length > 0) {
var sortedNamespaceData = _.sortBy(this.nameSpaceCollection.models, function(obj) {
return obj.get('name')
});
_.each(sortedNamespaceData, function(obj) {
var namespaceName = obj.get('name');
var sortedNamespaceAttr = _.sortBy(obj.attributes.attributeDefs, function(obj) {
if (this.type) {
var entityDef = this.entityDefCollection.fullCollection.find({ name: that.options.applicableType }),
namespaceAttributeDefs = null;
if (entityDef) {
namespaceAttributeDefs = entityDef.get("namespaceAttributeDefs");
}
if (namespaceAttributeDefs) {
_.each(namespaceAttributeDefs, function(attributes, key) {
var sortedAttributes = _.sortBy(attributes, function(obj) {
return obj.name;
});
_.each(sortedNamespaceAttr, function(attrDetails) {
if (attrDetails.options && attrDetails.options.applicableEntityTypes && that.options.applicableType && (JSON.parse(attrDetails.options.applicableEntityTypes).indexOf(that.options.applicableType) != -1)) {
_.each(sortedAttributes, function(attrDetails) {
var returnObj = that.getObjDef(attrDetails, rules_widgets, isGroupView, 'Select Namespace Attribute', true);
if (returnObj) {
returnObj.id = namespaceName + "." + returnObj.id;
returnObj.label = namespaceName + ": " + returnObj.label;
returnObj.id = key + "." + returnObj.id;
returnObj.label = key + ": " + returnObj.label;
returnObj.data = { 'entityType': "namespace" };
filters.push(returnObj);
}
}
})
});
});
}
}
filters = _.uniq(filters, 'id');
if (filters && !_.isEmpty(filters)) {
......
......@@ -133,7 +133,7 @@ define([
this.showDefaultPage();
},
showDefaultPage: function() {
if (this.options.value) {
if (Utils.getUrlState.isSearchTab() && this.options.value) {
if (
!this.options.value.type &&
!this.options.value.tag &&
......
......@@ -30,8 +30,9 @@ define(['require',
'utils/Messages',
'utils/Enums',
'utils/UrlLinks',
'moment',
'platform'
], function(require, Backbone, tableDragger, SearchResultLayoutViewTmpl, Modal, VEntity, Utils, Globals, VSearchList, VCommon, CommonViewFunction, Messages, Enums, UrlLinks, platform) {
], function(require, Backbone, tableDragger, SearchResultLayoutViewTmpl, Modal, VEntity, Utils, Globals, VSearchList, VCommon, CommonViewFunction, Messages, Enums, UrlLinks, moment, platform) {
'use strict';
var SearchResultLayoutView = Backbone.Marionette.LayoutView.extend(
......@@ -801,6 +802,20 @@ define(['require',
if (obj && obj.attributes) {
_.each(obj.attributes, function(namespaceValue, attributeName) {
if (attributeName.indexOf('.') != -1) {
var isDate = false,
namespace = that.options.nameSpaceCollection.fullCollection.find({ "name": attributeName.split('.')[0] });
if (namespace) {
var getAttributes = namespace.get('attributeDefs');
getAttributes.every(function(attrTypeCheck) {
if (attributeName.split('.')[1] === attrTypeCheck.name && attrTypeCheck.typeName.indexOf("date") > -1) {
isDate = true;
}
return !isDate;
});
}
if (isDate) {
namespaceValue = moment(namespaceValue).format("MM/DD/YYYY")
}
namespaceStr += '<label class="btn btn-action btn-xs btn-blue no-pointer">' + attributeName + ': ' + namespaceValue + '</label>';
}
})
......
......@@ -142,46 +142,25 @@ define([
this.ui.nameSpaceSearchTree.jstree(true).deselect_all();
this.namespaceID = null;
}
// if (this.options.value === undefined) {
// this.options.value = {};
// }
// if (!this.options.value.tag) {
// this.ui.nameSpaceSearchTree.jstree(true).deselect_all();
// this.nameSpaceId = null;
// } else {
// if (that.options.value.tag.indexOf("*") != -1) {
// that.ui.nameSpaceSearchTree.jstree(true).deselect_all();
// }
// var dataFound = this.nameSpaceCollection.fullCollection.find(function(obj) {
// return obj.get("name") === that.options.value.tag;
// });
// if (dataFound) {
// if ((this.nameSpaceId && this.nameSpaceId !== dataFound.get("guid")) || this.nameSpaceId === null) {
// if (this.nameSpaceId) {
// this.ui.nameSpaceSearchTree.jstree(true).deselect_node(this.nameSpaceId);
// }
// this.fromManualRender = true;
// this.nameSpaceId = dataFound.get("guid");
// this.ui.nameSpaceSearchTree.jstree(true).select_node(dataFound.get("guid"));
// }
// }
// if (!dataFound && Globals[that.options.value.tag]) {
// this.fromManualRender = true;
// this.typeId = Globals[that.options.value.tag].guid;
// this.ui.nameSpaceSearchTree.jstree(true).select_node(this.typeId);
// }
// }
},
onNodeSelect: function(nodeData) {
var that = this,
options = nodeData.node.original,
url = "#!/administrator/namespace";
url = "#!/administrator/namespace",
trigger = true,
queryParams = Utils.getUrlState.getQueryParams();
if (options.parent === undefined) {
url += "/" + options.id;
}
if (queryParams && queryParams.from === "namespace" && Utils.getUrlState.getQueryUrl().queyParams[0] === url) {
trigger = false;
}
if (trigger) {
this.triggerUrl(url);
} else {
//this.triggerSearch();
}
},
onViewEditNameSpace: function() {
var selectedNode = this.ui.nameSpaceSearchTree.jstree("get_selected", true);
......@@ -194,16 +173,6 @@ define([
}
}
},
// triggerSearch: function(params, url) {
// var serachUrl = url ? url : "#!/search/searchResult";
// Utils.setUrl({
// url: serachUrl,
// urlParams: params,
// mergeBrowserUrl: false,
// trigger: true,
// updateTabState: true
// });
// },
triggerUrl: function(url) {
Utils.setUrl({
url: url,
......@@ -252,32 +221,6 @@ define([
};
return nodeStructure;
};
// getChildren = function(options) {
// var children = options.children,
// data = [],
// dataWithoutEmptyTag = [],
// isAttrNode = true;
// if (children && children.length) {
// _.each(children, function(attrDetail) {
// var nodeDetails = {
// name: _.escape(attrDetail.name),
// model: attrDetail
// },
// nodeProperties = {
// parent: options.parent,
// text: _.escape(attrDetail.name),
// model: attrDetail,
// id: options.parent + "_" + _.escape(attrDetail.name)
// },
// getNodeDetails = generateNode(nodeDetails, isAttrNode),
// classificationNode = _.extend(getNodeDetails, nodeProperties);
// data.push(classificationNode);
// });
// } else {
// return null;
// }
// return data;
// };
_.each(namsSpaceTreeData, function(filterNode) {
nameSpaceList.push(generateNode(filterNode));
});
......
......@@ -34,6 +34,7 @@ define(['require',
ui: {
backButton: "[data-id='backButton']",
menuHamburger: "[data-id='menuHamburger']",
administrator: "[data-id='administrator']",
signOut: "[data-id='signOut']"
},
events: function() {
......@@ -52,6 +53,16 @@ define(['require',
var path = Utils.getBaseUrl(window.location.pathname);
window.location = path + "/logout.html";
};
events['click ' + this.ui.administrator] = function() {
Utils.setUrl({
url: "#!/administrator",
mergeBrowserUrl: false,
trigger: true,
updateTabState: true
});
};
return events;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment