Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
VinceMacBuche committed Feb 14, 2017
1 parent 83e74bd commit 65495a5
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class RuleDisplayer (
<div class="box-body">
<div class="row">
<div class="col-xs-12">
<div id="showFiltersRules" ng-controller="filterTagRuleCtrl" class="filters tw-bs" ng-cloak="">
<div id="showFiltersRules" ng-controller="filterTagCtrl" ng-init="initRule()" class="filters tw-bs" ng-cloak="">
<div class="filters-container">
<div class="filterTag">
<div class="input-group search-addon">
Expand All @@ -251,7 +251,7 @@ class RuleDisplayer (
<span class="input-group-addon addon-json">=</span>
<input placeholder="value" class="form-control input-sm input-value" type="text" ng-model="newTag.value"/>
<span class="input-group-btn">
<button type="button" ng-click="addTag()" class="btn btn-success btn-sm" ng-disabled=" (isEmptyOrBlank(newTag.key) && isEmptyOrBlank(newTag.value)); ">
<button type="button" ng-click="addTag(newTag)" class="btn btn-success btn-sm" ng-disabled=" (isEmptyOrBlank(newTag.key) && isEmptyOrBlank(newTag.value)); ">
<span class="fa fa-plus"></span>
</button>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class TagsEditForm(tags : Tags) extends Loggable {

private[this] def tagTemplate(controllerId:String, appId : String, isEditForm : Boolean, isRule : Boolean) = {

val filterController = if (isRule) {
"filterTagRuleCtrl"
val filterId = if (isRule) {
"showFiltersRules"
} else {
"filterTagDirectiveCtrl"
"directiveFilter"
}
val css: CssSel =
"#tagsController [id]" #> (controllerId) &
Expand All @@ -57,7 +57,7 @@ class TagsEditForm(tags : Tags) extends Loggable {
}
var scope = angular.element($$("#${controllerId}")).scope();
scope.$$apply(function(){
scope.init( ${jsTags}, "${filterController}" , ${isEditForm});
scope.init( ${jsTags}, "${filterId}" , ${isEditForm});
});
""")))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ object DisplayDirectiveTree extends Loggable {
}

displayCategory(directiveLib, "jstn_0").toXml ++ Script(OnLoad(JsRaw("""
var scopeElmnt = '#activeTechniquesTree_actions_zone'
var scopeElmnt = '#directiveFilter'
if(!angular.element(scopeElmnt).scope()){
angular.bootstrap(scopeElmnt, ['filters']);
}
Expand Down
Loading

0 comments on commit 65495a5

Please sign in to comment.