Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Filter rudimentär integriert

  • Loading branch information...
commit c612bd8f8c3d7136fe248b609424347cb5dade7c 1 parent 452961d
Stephan authored
View
27 app/modules/localeEdit/views.js
@@ -75,9 +75,13 @@ Views.EditList = Backbone.View.extend({
manage: true,
className: 'container',
+ dataSearchTerms : {
+ keySearchterm :'FooSearch'
+ },
data: function() {
return {
- count: this.collection.length
+ count: this.collection.length,
+ keySearchterm: this.dataSearchTerms.keySearchterm
};
},
@@ -88,18 +92,25 @@ Views.EditList = Backbone.View.extend({
//"change #taskSorting":"sorts"
},
search: function(e){
- var searchTerm = $("#keySearchTask").val();
- //this.renderList(this.collection.search(letters));
- this.collection.filter(function(model) {
- return model.get("LocaleKey").indexOf(searchTerm) != -1;
- });
- this.collection.reset();
+ this.dataSearchTerms.keySearchterm = $("#keySearchTask").val();
+ var collToUse = this.wholeCollecxtion || this.collection;
+ this.renderList(collToUse.search(this.dataSearchTerms.keySearchterm));
+ // this.collection.filter(function(model) {
+ // return model.get("LocaleKey").indexOf(searchTerm) != -1;
+ // });
+ // this.collection.reset();
},
save: function() {
//localStorage.setItem(this.name, JSON.stringify(this.data));
LocaleEdit.SaveLocales(this.collection);
},
renderList : function(task){
+ if(this.wholeCollecxtion === undefined)
+ {
+ this.wholeCollecxtion = this.collection;
+ };
+ this.collection = task;
+ this.render();
console.log(task);
},
@@ -123,7 +134,7 @@ Views.EditList = Backbone.View.extend({
initialize: function() {
this.collection.on("reset", this.render, this);
-
+ this.searchterm ="";
this.collection.on("fetch", function() {
this.$("div.loading").html("<img src='/app/img/loading.gif'>");
}, this);
View
2  app/templates/localeedit/edit.html
@@ -26,7 +26,7 @@
<div class="container">
<div class="row" style="padding: 0 0 0 40px;">
- <input id="keySearchTask" class="input-medium" type="text" placeholder="KEY"></input>
+ <input id="keySearchTask" class="input-medium" type="text" placeholder="KEY" value='<%= keySearchterm %>'></input>
<input class="input-medium" type="text" placeholder="LANGUAGE"></input>
<input class="input-medium" type="text" placeholder="VALUE"></input>
</diV>
View
2  files/user_1/Intranet.Locale.FR.js
@@ -6,7 +6,7 @@ DATETIMESTRING: function (x) {
DATESTRING: function (x) {
return this.localizeDateString(x);
},
-REPORTING: 'Reporting',
+REPORTING: 'la reReporting',
DASHBOARD: 'Tableau de bord',
TOURLIST: 'Tour-liste',
TOURCAT: 'Tour',
View
2  files/user_1/Intranet.Locale.NL.js
@@ -6,7 +6,7 @@ DATETIMESTRING: function (x) {
DATESTRING: function (x) {
return this.localizeDateString(x);
},
-REPORTING: 'ReportingDFGFDGDFG',
+REPORTING: 'Reporting',
DASHBOARD: 'Dashboard',
TOURLIST: 'Routelijst',
TOURCAT: 'Route',
View
6 localeEditFileManager.js
@@ -2,7 +2,7 @@ var fs = require('fs')
, path = require('path')
, vm = require('vm')
, util = require('util')
- , mv = require('mv')
+// , mv = require('mv')
, sandbox = {
Intranet: {
Locale: {},
@@ -298,11 +298,11 @@ function moveExistingFilesToBackUpFolder(folder, callback){
// is.pipe(os);
// fs.unlinkSync(fname.Path);
- mv(fname.Path, outPutFolder+ '/' +fname.Name, function(err) {
+/* mv(fname.Path, outPutFolder+ '/' +fname.Name, function(err) {
// done. it tried fs.rename first, and then falls back to
// piping the source file to the dest file and then unlinking
// the source file.
- });
+ });*/
}
callback();
Please sign in to comment.
Something went wrong with that request. Please try again.