Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • CAS_URL - String. URL to access cas login service. eg: this.BASE_PORTAL_URL + '/cas'
  • LOCAL_MODULES - Array. Contains objects to be included in native app that either override existing portlets, or are only available in the native app. eg: this.LOCAL_MODULES.map = { title: 'map', iconUrl: 'icons/map.png', fname: 'map', window: 'map', doesRequireLayout: false }; doesRequireLayout indicates if it must exist in the JSON layout returned from the uPortal instance
  • DEFAULT_MAP_REGION - Object. Tells the map the default area to pan/zoom to when loaded. eg: {{{ latitude: 34.052819, longitude: -118.256407, latitudeDelta: 0.005, longitudeDelta: 0.005 }}}
  • nativeIcons - Array. Associative array indexed by fnames of modules, to override the icons returned from the portal with local icons optimized for device resolutions. eg: this.nativeIcons = {videos: 'icons/youtube.png'}
  • directoryEmergencyContacts - Array. Contains objects containing emergency contact information to be displayed in home page of directory. eg: this.directoryEmergencyContacts = [{ displayName: "Westin Bonaventure Hotel and Suites",telephoneNumber: '(866) 716-8137',postalAddress: '404 South Figueroa Street$Los Angeles, CA 90071', url:'http://www.starwoodhotels.com/westin/search/hotel_detail.html?propertyID=1004'}
  • phoneDirectoryNumber - String. If defined, will display in the directory default view, and allow users to call the school's phone directory from the app. eg: '888 555 5555'

Localization

There's a javascript file in the root called "localization.js", which contains an array called localDictionary, which is a collection of locales indexed by string (eg localDictionary['en_US']). Each locale is a dictionary object with a lower camel case english representation of each word/phrase (eg. getDirections: "Get Directions"). 

...

In titanium, when creating new "View" objects, or any UI object, a 'create' method accepts an object containing style attributes (and sometimes value attributes). The style.js creates the foundation for the object to be passed into the create method, which can be appended if additional values need to be passed in at creation time. For example:

In style.js:

Code Block
javascript
javascript

titleLabel: {

...


    color: '#000'

...


}

Implement the label without modifying any styles:

Code Block
javascript
javascript

var titleLabel = Titanium.UI.createLabel(app.styles.titleLabel);

Or modify the label attributes before creating it:

Code Block
javascript
javascript

var titleLabelOptions = app.styles.titleLabel;

...


var titleLabelOptions.text = "Title Text";

...


var titleLabel = Titanium.UI.createLabel(titleLabelOptions);

...