More localization of querybuilder
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function QueryBuilderOverlayController($scope, templateQueryResource) {
|
||||
function QueryBuilderOverlayController($scope, templateQueryResource, localizationService) {
|
||||
|
||||
var everything = localizationService.localize("template_allContent");
|
||||
var myWebsite = localizationService.localize("template_myWebsite");
|
||||
|
||||
var vm = this;
|
||||
|
||||
@@ -17,10 +20,10 @@
|
||||
|
||||
vm.query = {
|
||||
contentType: {
|
||||
name: "Everything"
|
||||
name: everything
|
||||
},
|
||||
source: {
|
||||
name: "My website"
|
||||
name: myWebsite
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
@@ -113,6 +116,12 @@
|
||||
|
||||
function trashFilter(query) {
|
||||
query.filters.splice(query, 1);
|
||||
|
||||
//if we remove the last one, add a new one to generate ui for it.
|
||||
if (query.filters.length == 0) {
|
||||
query.filters.push({});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function changeSortOrder(query) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="query-items">
|
||||
|
||||
<span><localize key="template_iWant">I Want</localize></span>
|
||||
<span><localize key="template_iWant">I want</localize></span>
|
||||
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<i class="icon-add"></i>
|
||||
</a>
|
||||
|
||||
<a href ng-if="vm.query.filters.length > 1" ng-click="vm.trashFilter(vm.query)">
|
||||
<a href ng-click="vm.trashFilter(vm.query)">
|
||||
<i class="icon-trash"></i>
|
||||
</a>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user