diff options
author | asteroide <thomas.duval@orange.com> | 2017-06-09 16:18:59 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2017-06-09 16:18:59 +0200 |
commit | 60bb98696ee93f979914d8e88ed4708f59fcff9c (patch) | |
tree | a404880ec261f95c69fa4a6a1edd50ef9a66d160 /moonv4/moon_gui/static/app/model/edit/metarules | |
parent | 8039214d0caedfec5456bd8ee0898a1b9a55629a (diff) |
Stable version
Change-Id: I70001bedbdf1823cb9e8dccd545800387777201b
Diffstat (limited to 'moonv4/moon_gui/static/app/model/edit/metarules')
-rw-r--r-- | moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html | 199 | ||||
-rw-r--r-- | moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js | 7 |
2 files changed, 99 insertions, 107 deletions
diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html b/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html index c36700ff..ebe307c3 100644 --- a/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html +++ b/moonv4/moon_gui/static/app/model/edit/metarules/metarules-list.tpl.html @@ -1,149 +1,138 @@ <div> - <div class="row"> - <div><h4 data-translate="moon.model.metarules.title">List of Meta Rules</h4></div> + <div><h4 data-translate="moon.model.metarules.title">List of Meta Rules</h4></div> - </div> - - <div class="row"> - - <div class="table-responsive" data-role="table"> - <table class="table table-striped table-hover" ng-table="list.table"> - - <colgroup> - <col class="col-md-2" /> - <col class="col-md-2" /> - <col class="col-md-1" /> - <col class="col-md-1" /> - <col class="col-md-1" /> - <col class="col-md-2" /> - </colgroup> + <div class="table-responsive" data-role="table"> + <table class="table table-striped table-hover" ng-table="list.table"> - <thead> + <colgroup> + <col class="col-md-2" /> + <col class="col-md-2" /> + <col class="col-md-1" /> + <col class="col-md-1" /> + <col class="col-md-1" /> + <col class="col-md-2" /> + </colgroup> - <tr> + <thead> - <th class="customTables sortable" - ng-class="{ 'sort-asc': list.table.isSortBy('name', 'asc'), 'sort-desc': list.table.isSortBy('name', 'desc') }" - ng-click="list.table.sorting('name', list.table.isSortBy('name', 'asc') ? 'desc' : 'asc')"> - <div data-translate="moon.model.metarules.table.name">Name</div> - </th> + <tr> - <th class="customTables sortable" - ng-class="{ 'sort-asc': list.table.isSortBy('description', 'asc'), 'sort-desc': list.table.isSortBy('description', 'desc') }" - ng-click="list.table.sorting('description', list.table.isSortBy('description', 'asc') ? 'desc' : 'asc')"> - <div data-translate="moon.model.metarules.table.description">Description</div> - </th> + <th class="customTables sortable" + ng-class="{ 'sort-asc': list.table.isSortBy('name', 'asc'), 'sort-desc': list.table.isSortBy('name', 'desc') }" + ng-click="list.table.sorting('name', list.table.isSortBy('name', 'asc') ? 'desc' : 'asc')"> + <div data-translate="moon.model.metarules.table.name">Name</div> + </th> - <th class="customTables sortable"> - <div data-translate="moon.model.metarules.table.metadata.subject.number">Number of Subjects</div> - </th> + <th class="customTables sortable" + ng-class="{ 'sort-asc': list.table.isSortBy('description', 'asc'), 'sort-desc': list.table.isSortBy('description', 'desc') }" + ng-click="list.table.sorting('description', list.table.isSortBy('description', 'asc') ? 'desc' : 'asc')"> + <div data-translate="moon.model.metarules.table.description">Description</div> + </th> - <th class="customTables sortable"> - <div data-translate="moon.model.metarules.table.metadata.object.number">Number of Subjects</div> - </th> + <th class="customTables sortable"> + <div data-translate="moon.model.metarules.table.metadata.subject.number">Number of Subjects</div> + </th> - <th class="customTables sortable"> - <div data-translate="moon.model.metarules.table.metadata.action.number">Number of Actions</div> - </th> + <th class="customTables sortable"> + <div data-translate="moon.model.metarules.table.metadata.object.number">Number of Subjects</div> + </th> - <th class="customTables"> - <div data-translate="moon.model.metarules.action.title">Actions</div> - </th> - </tr> + <th class="customTables sortable"> + <div data-translate="moon.model.metarules.table.metadata.action.number">Number of Actions</div> + </th> - </thead> + <th class="customTables"> + <div data-translate="moon.model.metarules.action.title">Actions</div> + </th> + </tr> - <tbody ng-if="!list.hasMetaRules()"> - <tr> - <td colspan="2"><span data-translate="moon.model.metarules.table.notFound">There is no Meta Rules</span></td> - </tr> - </tbody> + </thead> - <tbody ng-if="list.hasMetaRules()"> + <tbody ng-if="!list.hasMetaRules()"> + <tr> + <td colspan="2"><span data-translate="moon.model.metarules.table.notFound">There is no Meta Rules</span></td> + </tr> + </tbody> - <tr ng-repeat="aMetaRules in $data | filter:list.search.find | orderBy:sort:reverse"> - <td ng-bind="aMetaRules.name"></td> - <td ng-bind="aMetaRules.description"></td> - <td ng-bind="aMetaRules.subject_categories.length"></td> - <td ng-bind="aMetaRules.object_categories.length"></td> - <td ng-bind="aMetaRules.action_categories.length"></td> - <td> + <tbody ng-if="list.hasMetaRules()"> - <div ng-if="list.editMode"> + <tr ng-repeat="aMetaRules in $data | filter:list.search.find | orderBy:sort:reverse"> + <td ng-bind="aMetaRules.name"></td> + <td ng-bind="aMetaRules.description"></td> + <td ng-bind="aMetaRules.subject_categories.length"></td> + <td ng-bind="aMetaRules.object_categories.length"></td> + <td ng-bind="aMetaRules.action_categories.length"></td> + <td> - <div ng-if="!value.loader" class="dropdown"> + <div ng-if="list.editMode"> - <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> - <span data-translate="moon.model.metadata.table.action.title">Actions</span> - <span class="caret"></span> - </button> + <div ng-if="!value.loader" class="dropdown"> - <ul class="dropdown-menu"> + <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> + <span data-translate="moon.model.metadata.table.action.title">Actions</span> + <span class="caret"></span> + </button> - <li> - <a href="" ng-click="list.unmap.showModal(aMetaRules)" > - <span class="glyphicon glyphicon-transfer"></span> - <span class="control-label" data-translate="moon.model.metarules.action.remove">Remove</span> - </a> - </li> + <ul class="dropdown-menu"> - <li> - <a href="" ng-click="list.edit.showModal(aMetaRules)"> - <span class="glyphicon glyphicon-cog"></span> - <span class="control-label" data-translate="moon.model.metarules.action.edit">Edit</span> - </a> - </li> + <li> + <a href="" ng-click="list.unmap.showModal(aMetaRules)" > + <span class="glyphicon glyphicon-transfer"></span> + <span class="control-label" data-translate="moon.model.metarules.action.remove">Remove</span> + </a> + </li> - </ul> + <li> + <a href="" ng-click="list.edit.showModal(aMetaRules)"> + <span class="glyphicon glyphicon-cog"></span> + <span class="control-label" data-translate="moon.model.metarules.action.edit">Edit</span> + </a> + </li> - </div> + </ul> </div> - <div ng-if="!list.editMode"> + </div> - <a href="" ng-click="list.showDetail(aMetaRules)"> + <div ng-if="!list.editMode"> - <span ng-if="aMetaRules.id !== list.getShowDetailValue().id"> - <span class="glyphicon glyphicon-eye-open"></span> - <span class="control-label" data-translate="moon.model.metarules.action.detail.open">Consult</span> - </span> + <a href="" ng-click="list.showDetail(aMetaRules)"> - <span ng-if="aMetaRules.id === list.getShowDetailValue().id"> - <span class="glyphicon glyphicon-eye-close"></span> - <span class="control-label" data-translate="moon.model.metarules.action.detail.close">Close</span> - </span> + <span ng-if="aMetaRules.id !== list.getShowDetailValue().id"> + <span class="glyphicon glyphicon-eye-open"></span> + <span class="control-label" data-translate="moon.model.metarules.action.detail.open">Consult</span> + </span> - </a> + <span ng-if="aMetaRules.id === list.getShowDetailValue().id"> + <span class="glyphicon glyphicon-eye-close"></span> + <span class="control-label" data-translate="moon.model.metarules.action.detail.close">Close</span> + </span> - </div> + </a> - </td> - </tr> + </div> - </tbody> + </td> + </tr> - </table> + </tbody> - <div ng-if="list.showDetailValue"> - <moon-meta-data-list edit-mode="list.editMode" meta-rule="list.getShowDetailValue()"></moon-meta-data-list> - </div> + </table> + <div ng-if="list.showDetailValue"> + <moon-meta-data-list edit-mode="list.editMode" meta-rule="list.getShowDetailValue()"></moon-meta-data-list> </div> </div> - <div class="row" ng-if="list.editMode"> - - <div class="form-group"> - <a href="" ng-click="list.map.showModal()" class="btn btn-default"> - <span class="glyphicon glyphicon-link"></span> - <span data-translate="moon.model.metarules.action.settings">Settings</span> - </a> - </div> - + <div class="form-group" ng-if="list.editMode"> + <a href="" ng-click="list.map.showModal()" class="btn btn-default"> + <span class="glyphicon glyphicon-link"></span> + <span data-translate="moon.model.metarules.action.settings">Settings</span> + </a> </div> </div> diff --git a/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js b/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js index 8fba0266..120b6a8b 100644 --- a/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js +++ b/moonv4/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js @@ -59,6 +59,11 @@ list.edit = { modal: $modal({ template: 'html/model/edit/metarules/action/metarules-edit.tpl.html', show: false }), showModal: showEditModal }; + /*list.edit.modal.result.finally(function(){ + console.log('CATCHING'); + });*/ + + list.map = { modal: $modal({ template: 'html/model/edit/metarules/action/mapping/metarules-map.tpl.html', show: false }), showModal: showMapModal }; @@ -224,8 +229,6 @@ }); - - } function modelUnmappedError(event) { |