These are chat archives for jdubray/sam

4th
Feb 2016
Jean-Jacques Dubray
@jdubray
Feb 04 2016 23:24
I have not done this before, but I was curious as to how SAM would apply to Cordova, so I am starting from scratch a little Cordova project.
To make it realistic, I purchased a Cordova theme this morning, I cannot share the theme, since it is copyrighted (http://themeforest.net/tags/cordova)
Here are steps I am following: https://cordova.apache.org/#getstarted
I just copied the theme in the /www directory of the cordova project
Jean-Jacques Dubray
@jdubray
Feb 04 2016 23:32
The first thing you need to build is what I call the "theme" for the lack of a better word. The theme is the structure of the UI in which the page will be displayed
This message was deleted
Each page of my theme has a "preloader" element, so we'll start there:
var theme = {} ;
theme.preloader = function(message) {
    message = message || 'Loading the content...' ;
    return ('<div id="status">\n\
        <p class="center-text">\n\
            ' + message + '\n\
        </p>\n\
    </div>\n') ;
} ;
Jean-Jacques Dubray
@jdubray
Feb 04 2016 23:53

The next item is the sidebar, that's just as simple.

There are quite a bit of menu items in the sidebar so let's start here

theme.menuItem = function(item) {
    item = item || {} ;
    item.link = item.link || '#' ;
    item.label = item.label || 'LABEL' ;
    item.iconLeft = item.iconLeft || 'angle-right' ;
    item.iconRight = item.iconRight || 'circle' ;
    return ('\n\            
                        <a href="'+item.link+'">\n\
                            <i class="fa fa-'+item.iconLeft+'"></i>\n\
                            '+item.label+'\n\
                            <i class="fa fa-'+item.iconRight+'"></i>\n\
                        </a>\n') ;
}