Permalink
Browse files

Header file comments added

  • Loading branch information...
1 parent 2c6b7e7 commit a44774f45db19e2eece00c9702ed3e968ce320cc @jaraen committed Oct 28, 2011
View
@@ -1,3 +1,8 @@
+/**
+ * TitanTricks app
+ * @version 0.2
+ * @author Javier Rayon, 2011. Criteria Studio.
+ */
Ti.include('/app/tools.js', '/app/TitanTricks.js');
@@ -1,3 +1,6 @@
+/**
+ * Declares App global object and mixes with tools function
+ */
var App = {};
@@ -8,4 +11,10 @@ var App = {};
})();
-Ti.include('/app/config/config.js', '/app/model/model.js', '/app/ui/ui.js');
+//include all index-files for each folder
+
+Ti.include(
+ '/app/config/config.js',
+ '/app/model/model.js',
+ '/app/ui/ui.js'
+);
@@ -1,6 +1,10 @@
+/**
+ * Creates main window creator function
+ */
+
//Always declare public methods on header
-//This ways are easier to identify what is in this file
+//This ways is easier to find out the file content.
App.ui.createAppWindow = {};
(function(){
@@ -1,4 +1,8 @@
+/**
+ * Row renderer for main index table view (ViewIndex.js)
+ */
+
App.ui.createRowItem = {};
(function(){
@@ -1,7 +1,11 @@
-//This method returns a fullwidth view with a table.
-//The table contains a row for each demo of titanTricks.
-//When a row is clicked, the correspondent demo view is created in a new window
-//and destroyed when closed
+/**
+ * Creates main menu table view ("index table")
+ */
+
+// This method returns a fullwidth view with a table.
+// The table contains a row for each demo of titanTricks.
+// When a row is clicked, the correspondent demo view is created in a new window
+// and destroyed when closed.
App.ui.createViewIndex = {};
@@ -20,6 +24,7 @@ App.ui.createViewIndex = {};
var list = App.ui.demos.list;
//convert App.ui.demos.list array items in ViewTableRow objects
+
var oldHeader = '?';
for(var i = 0, j = list.length; i < j; i++) {
rows.push(App.ui.createRowItem(list[i]));
@@ -1,9 +1,7 @@
-
-//This view is used as template layout for each demo.
-//Title, description and so on are filled from the demoInfo private var
-//of each demo.
-//The view has a vertical layout, which must be considered when building
-//the demo UI view.
+/**
+ * View template for demos. Includes a title, description, demo instructions and a space
+ * to build the demo (in a vertical layout, which must be considered by the demo itself)
+ */
App.ui.createViewDemo = {};
@@ -1,3 +1,7 @@
+/**
+ * Window template for each demo. Creates a new window, with a toolbar if is under iPhone platform,
+ * inserts a ViewTemplateDemo and finally creates the demo view.
+ */
App.ui.createWinDemo = {};
@@ -1,4 +1,6 @@
-
+/**
+ * Function for iPhone toolBar creation (Android does not need a toolbar). Used in WinDemo.js
+ */
App.ui.createIosToolBar = {};
@@ -1,3 +1,6 @@
+/**
+ * Generic styles
+ */
App.ui.properties = {};
//App.ui.themes = {};
@@ -34,7 +37,7 @@ App.ui.properties = {};
SCROLLDEMO_VIEW: {
top:App.os({
android:0,
- iphone:40
+ iphone:40 //iphone toolbar size
}),
left:0,
right:0,
@@ -123,7 +126,7 @@ App.ui.properties = {};
height:80,
width:200,
zIndex:10,
- message:'Cargando...',
+ message:'Loading...',
style:Titanium.UI.iPhone.ActivityIndicatorStyle.BIG
}
};
@@ -1,4 +1,6 @@
-
+/**
+ * Index for all files on ui folder and App.ui declaration
+ */
App.ui = {};

0 comments on commit a44774f

Please sign in to comment.