浏览代码

Change variable names for binding

@soyjavi 14 年之前
父节点
当前提交
7f9c08527f
共有 3 个文件被更改,包括 12 次插入13 次删除
  1. 1 2
      CHANGES.md
  2. 5 5
      src/view/Lungo.View.Template.Binding.js
  3. 6 6
      src/view/Lungo.View.Template.js

+ 1 - 2
CHANGES.md

@@ -8,8 +8,7 @@
 - In Data.Sql.select() method if the total rows it's 1, returns a object and
   not a array of objects.
 - Scroll fixed in iOS v.5 devices
-- Hide Navigation bar when App Instance is started.
-- Creation of homogeneous parameters in methods view.binding() & .view.list.create()
+- Hide Navigation bar when App Instance is started (only in iOS Devices).
 - In Service.get() the parameters of url are setted by a JSON object.
 
 ## Changes in Version 1.0.1

+ 5 - 5
src/view/Lungo.View.Template.Binding.js

@@ -21,18 +21,18 @@ LUNGO.View.Template.Binding = (function(lng, undefined) {
      * @method create
      *
      * @param {String} Id of the container showing the result of databinding
-     * @param {Number} Databinding Template Id
+     * @param {String} Databinding Template Id
      * @param {Object} Data for binding
      * @param {Function} Callback when the process is complete
      */
-    var create = function(container_id, id, data, callback) {
-        if (lng.View.Template.exists(id)) {
-            var template = lng.View.Template.get(id);
+    var create = function(container_id, template_id, data, callback) {
+        if (lng.View.Template.exists(template_id)) {
+            var template = lng.View.Template.get(template_id);
             var markup = _processData(data, template);
             _render(container_id, markup);
             lng.Core.execute(callback);
         } else {
-            lng.Core.log(3, 'lng.View.Template.binding: id ' + id + ' not exists');
+            lng.Core.log(3, 'lng.View.Template.binding: id ' + template_id + ' not exists');
         }
     };
 

+ 6 - 6
src/view/Lungo.View.Template.js

@@ -1,6 +1,6 @@
-/** 
+/**
  * Lungo Template system
- * 
+ *
  * @namespace LUNGO.View
  * @class Template
  * @requires Zepto
@@ -8,7 +8,7 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  * @author Guillermo Pascual <pasku@tapquo.com> || @pasku1
  */
- 
+
 LUNGO.View.Template = (function(lng, undefined) {
 
     var _templates = {};
@@ -55,12 +55,12 @@ LUNGO.View.Template = (function(lng, undefined) {
      * @method binding
      *
      * @param {String} Id of the container showing the result of databinding
-     * @param {Number} Databinding Template Id
+     * @param {String} Databinding Template Id
      * @param {Object} Data for binding
      * @param {Function} Callback when the process is complete
      */
-    var binding = function(container_id, id, data, callback) {
-        lng.View.Template.Binding.create(container_id, id, data, callback);
+    var binding = function(container_id, template_id, data, callback) {
+        lng.View.Template.Binding.create(container_id, template_id, data, callback);
     };
 
     return {