Permalink
Browse files

Filter dummies hinzugefügt für edit list

  • Loading branch information...
1 parent 0ef834b commit d5af062540d3bfd3660de60b7c78ce77834de717 Stephan committed Nov 28, 2012
@@ -27,8 +27,7 @@ function(app, jquery, Views ) {
Localeedit.ItemModel = Backbone.Model.extend({
defaults: {
Language: 'XX',
- Value: 'Foo',
- Active: false
+ Value: 'Foo'
},
initialize: function() {
console.log('new Locale ItemModel');
@@ -27,25 +27,14 @@ function(app, Backbone) {
className: 'edititem ',
events: {
- click: "activateInput"
+ "change input.translation": "translationChanged"
},
- activateInput: function(ev) {
- var model = this.model;
- //this.$el.find('input').removeAttr('disable');
- model.Active = true;
- // var org = app.router.users.org;
- // var user = app.router.repos.user;
+ translationChanged: function(ev) {
+ console.log(ev);
+ },
- // // Immediately reflect the active state.
- // app.active = this.model;
- this.render();
- // // Easily create a URL.
- // app.router.go("org", org, "user", user, "repo", model.get("name"));
-
- return false;
- },
data: function() {
return { model: this.model };
}
@@ -64,16 +53,6 @@ function(app, Backbone) {
return { model: this.model };
},
- events: {
- click: "activateInput"
- },
-
- activateInput: function(ev) {
- var model = this.model;
-
-
- return false;
- },
beforeRender: function() {
var items = this.model.get('LocaleValues');
@@ -92,7 +71,8 @@ Views.EditList = Backbone.View.extend({
template: 'app/templates/localeedit/edit',
//tagName: 'div',
manage: true,
-
+ className: 'container',
+
data: function() {
return {
count: this.collection.length
@@ -123,7 +103,7 @@ Views.EditList = Backbone.View.extend({
this.collection.on("fetch", function() {
this.$("ul").parent().html("<img src='/app/img/loading.gif'>");
}, this);
- this.collection.fetch();
+ //this.collection.fetch();
}
});
View
@@ -65,7 +65,8 @@ function(app,LocaleEdit,jquery) {
jquery('ul.nav li').removeClass('active');
jquery('ul.nav a[href="#edit"]').parent().addClass('active');
- });
+ });
+ collection.fetch();
}
View
@@ -32,4 +32,11 @@ li.edititem {
clear: left;
}
+.edit-wrapper-outer{
+ margin: 0 0 10px 0;
+}
+.edit-wrapper-inner{
+ background-color: #ccc;
+ border: solid 1px #5E5E5E;
+}
@@ -1,13 +1,34 @@
-<div class="edit">
- <label></label>
-</div>
+
+
+ <div class="row" style="padding: 0 0 0 40px;">
+ <div class="pull-left">
<% if (count) { %>
-<h4>Locales (<%= count %>)</h4>
-<hr>
+ <h4>Anzahl der Locale Keys (<%= count %>)</h4>
+ <hr>
<% } else { %>
-<h4>No Locales found.</h4>
-<img src ="/app/img/loading.gif"></img>
-<% } %>
+ <h4>No Locales found.</h4>
+ <img src ="/app/img/loading.gif"></img>
+<% } %>
+ </div>
+ <div class="pull-right">
+ <button type="foo" class="btn btn-primary save">
+ <i class=" icon-ok icon-white"></i>
+ <span>Save</span>
+ </button>
+ <button type="foo" class="btn btn-danger delete">
+ <i class="icon-ban-circle icon-white"></i>
+ <span>Reload</span>
+ </button>
+ </diV>
+ </div>
+
+<div class="container">
+ <div class="row" style="padding: 0 0 0 40px;">
+ <input class="input-medium" type="text" placeholder="KEY"></input>
+ <input class="input-medium" type="text" placeholder="LANGUAGE"></input>
+ <input class="input-medium" type="text" placeholder="VALUE"></input>
+ </diV>
+</div>
<div class="localelistitems"></div>
@@ -1,6 +1,6 @@
-<div class="edit-wrapper-inner container hero-unit">
+<div class="edit-wrapper-inner container ">
<div class="edit-wrapper-inner row-fluid">
- <div class="pull-left span4 key">
+ <div class="pull-left span4 key hero-unit">
<span><%= model.get("LocaleKey") %></span>
</div>
<div class="pull-left span8 values">
@@ -1,2 +1,4 @@
- <span class="label"><%= model.Language %></span> <input type="text" <%= !model.Active ? 'disabled' : ''%> value='<%= model.Value %>'></input>
+ <span class="label"><%= model.Language %></span>
+ <input class="translation input-xxlarge" type="text" value='<%= model.Value %>'></input>
+ <!-- <textarea class="input-xxlarge" rows="3" type="text" placeholder=".input-xlarge"><%= model.Value %></textarea> -->
View
Binary file not shown.
View
@@ -16,7 +16,7 @@
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
<link rel="stylesheet" href="app/styles/jquery.fileupload-ui.css">
- <title>Backbone Boilerplate</title>
+ <title>DFF Locale Editor</title>
<!-- Application styles. -->
View
@@ -130,7 +130,7 @@ function toMultiLocaleItem (Locales){
for (var prop in lang) {
var existing = multiLocaleList[prop] || {Values: []};
var localValue = { Language: language,
- Value: lang[prop]
+ Value: lang[prop].toString()
}
existing.Values.push(localValue);
multiLocaleList[prop] = existing;
View
@@ -16,7 +16,7 @@
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
<link rel="stylesheet" href="app/styles/jquery.fileupload-ui.css">
- <title>Backbone Boilerplate</title>
+ <title>DFF Locale Editor</title>
<!-- Application styles. -->

0 comments on commit d5af062

Please sign in to comment.