diff --git a/app/alloy.js b/app/alloy.js index 8bbc0e9..e05d29f 100644 --- a/app/alloy.js +++ b/app/alloy.js @@ -15,8 +15,10 @@ Alloy.Globals.Map = require('ti.map'); Alloy.Globals.osName = Ti.Platform.osname; Alloy.Globals.filesDownload = {}; Alloy.Globals.updateCount = 0; +Alloy.Globals.isAndroidTablet = false; switch(Alloy.Globals.osName){ case 'android': + Alloy.Globals.isAndroidTablet = (Ti.Platform.Android.getPhysicalSizeCategory() == Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_LARGE || Ti.Platform.Android.getPhysicalSizeCategory() == Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_XLARGE); Alloy.Globals.museo_slab_500 = 'museo_slab_500'; Alloy.Globals.museo_slab_700 = 'museo_slab_700'; Alloy.Globals.museosans_300 = 'museosans_300'; @@ -97,6 +99,15 @@ updateData = function(type){ if(typeof mapping != 'undefined'){ for(var key in node){ if(typeof mapping[key] != 'undefined'){ + if(node[key] != ""){ + if(typeof mapping[key]['type'] != 'undefined' && mapping[key]['type'] == 'file' && typeof mapping[key]['callback'] != 'undefined' ){ + object[mapping[key]['field']] = (typeof mapping[key]['callback'] != 'undefined') ? mapping[key]['callback'](node[key], type) : node[key]; + } + else{ + object[mapping[key]['field']] = (typeof mapping[key]['callback'] != 'undefined') ? mapping[key]['callback'](node[key]) : node[key]; + } + } + /* if(typeof mapping[key]['type'] != 'undefined' && mapping[key]['type'] == 'file' && typeof mapping[key]['callback'] != 'undefined' && node[key] != ""){ file = true; files[files.length] = { @@ -109,6 +120,7 @@ updateData = function(type){ else if(node[key] != ""){ object[mapping[key]['field']] = (typeof mapping[key]['callback'] != 'undefined') ? mapping[key]['callback'](node[key]) : node[key]; } + */ } } } @@ -120,6 +132,10 @@ updateData = function(type){ var currentCollection = collection.get(object[id]); if(typeof object['changed'] == 'undefined' || (typeof currentCollection != 'undefined' && object['changed'] > currentCollection.get('changed')) || typeof currentCollection == 'undefined'){ ids[ids.length] = object[id]; + Ti.API.info(JSON.stringify(object)); + var row = Alloy.createModel(type,object); + row.save(); + /* if(file){ if(typeof Alloy.Globals.filesDownload[type] == 'undefined'){ Alloy.Globals.filesDownload[type] = new Array(); @@ -130,6 +146,7 @@ updateData = function(type){ var row = Alloy.createModel(type,object); row.save(); } + */ } } } @@ -163,11 +180,17 @@ updateData = function(type){ client.open("GET", url); client.send(); }; -function getImageBlob(url, data, field, type, files){ +function getImageBlob(url, type){ Alloy.Globals.updateCount++; + var filename = url.substring(url.lastIndexOf('/')+1); + var f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,filename); var xhr = Titanium.Network.createHTTPClient({ onload : function(e){ if (xhr.status == 200 ) { + f.write(this.responseData); // write to the file + var type = this._properties['type']; +// this.responseData +/* var data = this._properties['data']; var field = this._properties['field']; var files = this._properties['files']; @@ -181,12 +204,15 @@ function getImageBlob(url, data, field, type, files){ var currentFile = files.shift(); currentFile.callback(currentFile.value, data, currentFile.field, type, files); } +*/ } event = {}; event.type = type; Ti.App.fireEvent('updateDataEnd',event); }, onerror : function(e) { + var type = this._properties['type']; +/* var data = this._properties['data']; var field = this._properties['field']; var files = this._properties['files']; @@ -200,20 +226,26 @@ function getImageBlob(url, data, field, type, files){ var currentFile = files.shift(); currentFile.callback(currentFile.value, data, currentFile.field, type, files); } +*/ event = {}; event.type = type; Ti.App.fireEvent('updateDataEnd',event); }, }); - + xhr.applyProperties({ + 'type' : type, + }); +/* xhr.applyProperties({ 'data' : data, 'field' : field, 'type' : type, 'files' : files }); +*/ xhr.open('GET',url); xhr.send(); + return f.nativePath; } function getSponsorType(sponsorType){ var sponsorTypes = { @@ -530,4 +562,3 @@ function twitterShare(data){ }); } -Alloy.Globals.isAndroidTablet = (Ti.Platform.osname == "android" && (Ti.Platform.Android.getPhysicalSizeCategory() == Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_LARGE || Ti.Platform.Android.getPhysicalSizeCategory() == Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_XLARGE)); \ No newline at end of file diff --git a/app/assets/android/images/res-port-hdpi/favOff.png b/app/assets/android/images/res-port-hdpi/favOff.png index 4133b6f..e3a02b1 100644 Binary files a/app/assets/android/images/res-port-hdpi/favOff.png and b/app/assets/android/images/res-port-hdpi/favOff.png differ diff --git a/app/assets/android/images/res-port-hdpi/favOn.png b/app/assets/android/images/res-port-hdpi/favOn.png index bc5ee62..ffc5c3f 100644 Binary files a/app/assets/android/images/res-port-hdpi/favOn.png and b/app/assets/android/images/res-port-hdpi/favOn.png differ diff --git a/app/assets/android/images/res-port-ldpi/favOff.png b/app/assets/android/images/res-port-ldpi/favOff.png index 067269a..6d46bb3 100644 Binary files a/app/assets/android/images/res-port-ldpi/favOff.png and b/app/assets/android/images/res-port-ldpi/favOff.png differ diff --git a/app/assets/android/images/res-port-ldpi/favOn.png b/app/assets/android/images/res-port-ldpi/favOn.png index 093e92e..3844488 100644 Binary files a/app/assets/android/images/res-port-ldpi/favOn.png and b/app/assets/android/images/res-port-ldpi/favOn.png differ diff --git a/app/assets/android/images/res-port-mdpi/favOff.png b/app/assets/android/images/res-port-mdpi/favOff.png index 8f96266..46529bd 100644 Binary files a/app/assets/android/images/res-port-mdpi/favOff.png and b/app/assets/android/images/res-port-mdpi/favOff.png differ diff --git a/app/assets/android/images/res-port-mdpi/favOn.png b/app/assets/android/images/res-port-mdpi/favOn.png index 8d6afe9..f08948d 100644 Binary files a/app/assets/android/images/res-port-mdpi/favOn.png and b/app/assets/android/images/res-port-mdpi/favOn.png differ diff --git a/app/assets/android/images/res-port-xhdpi/favOff.png b/app/assets/android/images/res-port-xhdpi/favOff.png index bd15be3..c1a947d 100644 Binary files a/app/assets/android/images/res-port-xhdpi/favOff.png and b/app/assets/android/images/res-port-xhdpi/favOff.png differ diff --git a/app/assets/android/images/res-port-xhdpi/favOn.png b/app/assets/android/images/res-port-xhdpi/favOn.png index 7bfae89..e68acde 100644 Binary files a/app/assets/android/images/res-port-xhdpi/favOn.png and b/app/assets/android/images/res-port-xhdpi/favOn.png differ diff --git a/app/assets/android/images/res-port-xxhdpi/favOff.png b/app/assets/android/images/res-port-xxhdpi/favOff.png index 630f5ed..99c6d25 100644 Binary files a/app/assets/android/images/res-port-xxhdpi/favOff.png and b/app/assets/android/images/res-port-xxhdpi/favOff.png differ diff --git a/app/assets/android/images/res-port-xxhdpi/favOn.png b/app/assets/android/images/res-port-xxhdpi/favOn.png index 748c299..66db8b2 100644 Binary files a/app/assets/android/images/res-port-xxhdpi/favOn.png and b/app/assets/android/images/res-port-xxhdpi/favOn.png differ diff --git a/app/assets/images/favOff.png b/app/assets/images/favOff.png index 81dd009..6c5e233 100644 Binary files a/app/assets/images/favOff.png and b/app/assets/images/favOff.png differ diff --git a/app/assets/images/favOn.png b/app/assets/images/favOn.png index 7b1c983..c8160a2 100644 Binary files a/app/assets/images/favOn.png and b/app/assets/images/favOn.png differ diff --git a/app/controllers/blog.js b/app/controllers/blog.js index cdcdbb4..4c66d8b 100644 --- a/app/controllers/blog.js +++ b/app/controllers/blog.js @@ -17,8 +17,11 @@ for(var i = 0; i < blogPost.length; i++){ var image = Ti.UI.createImageView({touchEnabled: false, bubbeParent: true, image : blogPostImage, width : "100%"}); var label = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : blogPost[i].title}); $.addClass(label,"listTitle"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(label,"listTitleTablet"); + } var rowSeparator = Ti.UI.createView(); - $.addClass(rowSeparator,"rowSeparator"); + $.addClass(rowSeparator,"rowSeparatorBlog"); view.add(label); view.add(image); view.add(rowSeparator); diff --git a/app/controllers/blogPost.js b/app/controllers/blogPost.js index 18971e8..151aeb6 100644 --- a/app/controllers/blogPost.js +++ b/app/controllers/blogPost.js @@ -26,13 +26,20 @@ var viewLabel = Ti.UI.createView({ $.addClass(viewLabel,"viewLabel"); var labelTitle = Ti.UI.createLabel({ - text : blogPost.title + text : blogPost.title, + width: "80%" }); $.addClass(labelTitle,"listTitle"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(labelTitle,"listTitleTablet"); +} var labelDate = Ti.UI.createLabel({ text : blogPost.date }); $.addClass(labelDate,"listDate"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(labelDate,"listDateTablet"); +} $.headerBlog.add(image); $.headerBlog.add(labelDate); viewLabel.add(labelTitle); @@ -58,13 +65,15 @@ webView.addEventListener('load', function(e) { }); var social = Ti.UI.createView({ height : Ti.UI.SIZE, - layout : 'vertical' + layout : 'vertical', + width: "20%" }); $.addClass(social,"social"); var fb = Ti.UI.createImageView({ image : '/images/facebook.png', top : "5dp", - bubbleParent : false + bubbleParent : false, + width:"50%" }); fb.addEventListener("click",function(e){ var data = { @@ -77,7 +86,8 @@ social.add(fb); var twitter = Ti.UI.createImageView({ image : '/images/twitter.png', top : "5dp", - bubbleParent : false + bubbleParent : false, + width:"50%" }); twitter.addEventListener("click",function(e){ var data = blogPost.url + Alloy.CFG.hastag; diff --git a/app/controllers/favorites.js b/app/controllers/favorites.js index f7cf3ee..bfbbc56 100644 --- a/app/controllers/favorites.js +++ b/app/controllers/favorites.js @@ -41,6 +41,9 @@ function createRow(talkData){ $.addClass(headerSeparatorBottom,"headerSeparatorBottom"); var time = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.time}); $.addClass(time,"scheduleDate"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(time,"scheduleDateTablet"); + } headerViewElement.add(headerSeparatorTop); headerViewElement.add(time); headerViewElement.add(headerSeparatorBottom); @@ -50,17 +53,26 @@ function createRow(talkData){ var rowView = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "horizontal", width: Ti.UI.FILL, height: Ti.UI.SIZE}); $.addClass(rowView,"rowView"); var title = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.title}); - $.addClass(title,"listTitle"); - $.addClass(title,"listTitleSession"); + $.addClass(title,"listTitle listTitleSession"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(title," + listTitleTablet listTitleSessionTablet"); + } var speaker = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.name + " " + talk.surname}); $.addClass(speaker,"listSpeaker"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(speaker,"listSpeakerTablet"); + } var track = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.track}); $.addClass(track,"listTrack"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(track,"listTrackTablet"); + } var rowViewLeft = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "80%", height: Ti.UI.SIZE}); var rowViewRight = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "20%", height: Ti.UI.SIZE}); - var favorite = Ti.UI.createImageView({image : '/images/favOn.png', nid : talk.nid, bubbleParent : false}); + var favorite = Ti.UI.createImageView({image : '/images/favOn.png', nid : talk.nid, bubbleParent : false, width:"50%"}); $.addClass(favorite,"favorite"); favorite.addEventListener('click',function(e){ var favorites = Alloy.Collections.instance('favorites'); diff --git a/app/controllers/infoDetail.js b/app/controllers/infoDetail.js index 4e9326d..87a294e 100644 --- a/app/controllers/infoDetail.js +++ b/app/controllers/infoDetail.js @@ -22,6 +22,9 @@ else{ text : infoPost.title }); $.addClass(labelTitle,"listTitle"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(labelTitle,"listTitleTablet"); + } $.infoPost.add(labelTitle); } diff --git a/app/controllers/live.js b/app/controllers/live.js index e6aa4a2..de98a8d 100644 --- a/app/controllers/live.js +++ b/app/controllers/live.js @@ -38,6 +38,9 @@ function createRow(talkHoursList){ var timeContainer = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout: "absolute",height: Ti.UI.SIZE, width: Ti.UI.FILL}); var time = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talkHoursList[i] .time}); $.addClass(time,"scheduleDate"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(time,"scheduleDateTablet"); + } var headerSeparatorTop = Ti.UI.createView(); $.addClass(headerSeparatorTop,"headerSeparatorTop"); var headerSeparatorBottom = Ti.UI.createView(); @@ -68,13 +71,21 @@ function createRow(talkHoursList){ var rowView = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "horizontal", width: Ti.UI.FILL, height: Ti.UI.SIZE}); $.addClass(rowView,"rowView"); var title = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.title}); - $.addClass(title,"listTitle"); - $.addClass(title,"listTitleSession"); + $.addClass(title,"listTitle listTitleSession"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(title,"listTitleTablet listTitleSessionTablet"); + } var speaker = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.name + " " + talk.surname}); $.addClass(speaker,"listSpeaker"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(speaker,"listSpeakerTablet"); + } var track = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.track}); $.addClass(track,"listTrack"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(track,"listTrackTablet"); + } var rowViewLeft = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "80%", height: Ti.UI.SIZE}); var rowViewRight = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "20%", height: Ti.UI.SIZE}); @@ -86,13 +97,17 @@ function createRow(talkHoursList){ speakerTwitter = "@" + talk.speaker[k].twitter + " "; } $.addClass(speaker,"listSpeaker"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(speaker,"listSpeakerTablet"); + } rowViewLeft.add(speaker); } var twitter = Ti.UI.createImageView({ image : '/images/twitter.png', top : "5dp", bubbleParent : false, - speaker : speakerTwitter + speaker : speakerTwitter, + width:"50%" }); twitter.addEventListener("click",function(e){ var data = e.source.speaker + Alloy.CFG.hastag; diff --git a/app/controllers/location.js b/app/controllers/location.js index 6233679..48df788 100644 --- a/app/controllers/location.js +++ b/app/controllers/location.js @@ -56,5 +56,8 @@ if(GPSerror === false){ else{ var error = Ti.UI.createLabel({text : GPSerror}); $.addClass(error,"error"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(error,"errorTablet"); + } $.mapContainer.add(error); } diff --git a/app/controllers/schedule_group.js b/app/controllers/schedule_group.js index 1316ecf..22e3867 100644 --- a/app/controllers/schedule_group.js +++ b/app/controllers/schedule_group.js @@ -54,6 +54,9 @@ function createRow(talkData){ $.addClass(headerViewElement,"headerSession"); var time = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.time}); $.addClass(time,"scheduleDate"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(time,"scheduleDateTablet"); + } var headerSeparatorTop = Ti.UI.createView(); $.addClass(headerSeparatorTop,"headerSeparatorTop"); var headerSeparatorBottom = Ti.UI.createView(); @@ -68,16 +71,22 @@ function createRow(talkData){ var rowView = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "horizontal", width: Ti.UI.FILL, height: Ti.UI.SIZE}); $.addClass(rowView,"rowView"); var title = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.title}); - $.addClass(title,"listTitle"); - $.addClass(title,"listTitleSession"); + $.addClass(title,"listTitle listTitleSession"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(title,"listTitleTablet listTitleSessionTablet"); + } // var track = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.track}); // $.addClass(track,"listTrack"); +// if(Alloy.Globals.isAndroidTablet){ +// $.addClass(track,"listTrackTablet"); +// } + var rowViewLeft = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "80%", height: Ti.UI.SIZE}); var rowViewRight = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "20%", height: Ti.UI.SIZE}); var imagePath = (inFavorite) ? '/images/favOn.png' : '/images/favOff.png'; - var favorite = Ti.UI.createImageView({image : imagePath, nid : talk.nid, bubbleParent : false}); + var favorite = Ti.UI.createImageView({image : imagePath, nid : talk.nid, bubbleParent : false, width:"50%"}); $.addClass(favorite,"favorite"); favorite.addEventListener('click',function(e){ var favorites = Alloy.Collections.instance('favorites'); @@ -102,6 +111,9 @@ function createRow(talkData){ for(var k = 0; k < talk.speaker.length; k++){ var speaker = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.speaker[k].name + " " + talk.speaker[k].surname}); $.addClass(speaker,"listSpeaker"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(speaker,"listSpeakerTablet"); + } rowViewLeft.add(speaker); } rowViewRight.add(favorite); diff --git a/app/controllers/schedule_list.js b/app/controllers/schedule_list.js index 0f7288c..33dcd4c 100644 --- a/app/controllers/schedule_list.js +++ b/app/controllers/schedule_list.js @@ -33,6 +33,9 @@ function createRow(talkHoursList){ $.addClass(headerViewElement,"headerSession"); var time = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talkHoursList[i] .time}); $.addClass(time,"scheduleDate"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(time,"scheduleDateTablet"); + } var headerSeparatorTop = Ti.UI.createView(); $.addClass(headerSeparatorTop,"headerSeparatorTop"); var headerSeparatorBottom = Ti.UI.createView(); @@ -59,16 +62,21 @@ function createRow(talkHoursList){ var rowView = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "horizontal", width: Ti.UI.FILL, height: Ti.UI.SIZE}); $.addClass(rowView,"rowView"); var title = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.title}); - $.addClass(title,"listTitle"); - $.addClass(title,"listTitleSession"); + $.addClass(title,"listTitle listTitleSession"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(title,"listTitleTablet listTitleSessionTablet"); + } var track = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.track}); $.addClass(track,"listTrack"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(track,"listTrackTablet"); + } var rowViewLeft = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "80%", height: Ti.UI.SIZE}); var rowViewRight = Ti.UI.createView({touchEnabled: false, bubbeParent: true, layout : "vertical", width: "20%", height: Ti.UI.SIZE}); var imagePath = (inFavorite) ? '/images/favOn.png' : '/images/favOff.png'; - var favorite = Ti.UI.createImageView({image : imagePath, nid : talk.nid, bubbleParent : false}); + var favorite = Ti.UI.createImageView({image : imagePath, nid : talk.nid, bubbleParent : false, width:"50%"}); $.addClass(favorite,"favorite"); favorite.addEventListener('click',function(e){ var favorites = Alloy.Collections.instance('favorites'); @@ -92,6 +100,9 @@ function createRow(talkHoursList){ for(var k = 0; k < talk.speaker.length; k++){ var speaker = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : talk.speaker[k].name + " " + talk.speaker[k].surname}); $.addClass(speaker,"listSpeaker"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(speaker,"listSpeakerTablet"); + } rowViewLeft.add(speaker); } rowViewRight.add(favorite); diff --git a/app/controllers/speaker.js b/app/controllers/speaker.js index 92e0934..9c871d1 100644 --- a/app/controllers/speaker.js +++ b/app/controllers/speaker.js @@ -25,6 +25,9 @@ for(var i = 0; i < speakerData.length; i++){ $.addClass(image,"listImage"); var title = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : speaker.name + "\n" + speaker.surname}); $.addClass(title,"listTitle"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(title,"listTitleTablet"); + } var tableViewSection = Ti.UI.createView({height : Ti.UI.SIZE, layout: "vertical"}); rowView.add(image); diff --git a/app/controllers/speakerDetail.js b/app/controllers/speakerDetail.js index eba58a8..4a8d136 100644 --- a/app/controllers/speakerDetail.js +++ b/app/controllers/speakerDetail.js @@ -5,6 +5,9 @@ speakerData = speaker.get(args); var title = Ti.UI.createLabel({touchEnabled : false, bubbleParent: true, text : speakerData.get('name') + " " + speakerData.get('surname')}); $.addClass(title,"listTitle"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(title,"listTitleTablet"); +} var speakerImage = (speakerData.get('avatar') != null) ? speakerData.get('avatar') : '/images/speaker.png'; var image= Ti.UI.createImageView({touchEnabled : false, bubbleParent: true, image : speakerImage}); $.addClass(image,"listImage"); @@ -17,6 +20,9 @@ $.speakerDetail.add(headerView); var body = Ti.UI.createLabel({bubbleParent: true, text : speakerData.get('bio')}); $.addClass(body,"body"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(body,"bodyTablet"); +} var scrollView = Ti.UI.createScrollView({layout: 'vertical', scrollType : 'vertical', top: "5%"}); scrollView.add(body); $.speakerDetail.add(scrollView); diff --git a/app/controllers/sponsor.js b/app/controllers/sponsor.js index 0c055f0..e426ed3 100644 --- a/app/controllers/sponsor.js +++ b/app/controllers/sponsor.js @@ -12,6 +12,9 @@ for(var i = 0; i < sponsorTypes.length; i++){ $.addClass(headerViewElement,"headerViewElement"); var headerLabel = Ti.UI.createLabel({touchEnabled: false, bubbeParent: true, text : sponsorType.typeLabel}); $.addClass(headerLabel,"sponsorType"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(headerLabel,"sponsorTypeTablet"); + } headerViewElement.add(headerLabel); TableViewSections[sponsorType.type] = Ti.UI.createView({layout : "vertical", height: Ti.UI.SIZE}); TableViewSections[sponsorType.type].add(headerViewElement); diff --git a/app/controllers/talkDetail.js b/app/controllers/talkDetail.js index 8499028..f49ab6c 100644 --- a/app/controllers/talkDetail.js +++ b/app/controllers/talkDetail.js @@ -21,6 +21,9 @@ var surname = (typeof speakerData != "undefined") ? speakerData.get('surname') : var title = Ti.UI.createLabel({touchEnabled : false, bubbleParent: true, text : talkItem.get('title')}); $.addClass(title,"listTitle"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(title,"listTitleTablet"); +} var rowViewLeft = Ti.UI.createView({touchEnabled : false, bubbleParent: true, layout : "vertical", width: "80%", height: Ti.UI.SIZE}); var rowViewRight = Ti.UI.createView({touchEnabled : false, bubbleParent: true, layout : "vertical", width: "20%", height: Ti.UI.SIZE}); var favorites = Alloy.Collections.instance('favorites'); @@ -32,7 +35,8 @@ var favorite = Ti.UI.createImageView({ image : imagePath, nid : talkItem.get('nid'), bubbleParent : false, - top: "5dp" + top: "5dp", + width:"50%" }); favorite.addEventListener('click',function(e){ var favorites = Alloy.Collections.instance('favorites'); @@ -54,7 +58,8 @@ favorite.addEventListener('click',function(e){ var fb = Ti.UI.createImageView({ image : '/images/facebook.png', top : "5dp", - bubbleParent : false + bubbleParent : false, + width:"50%" }); fb.addEventListener("click",function(e){ var data = { @@ -66,7 +71,8 @@ fb.addEventListener("click",function(e){ var twitter = Ti.UI.createImageView({ image : '/images/twitter.png', top : "5dp", - bubbleParent : false + bubbleParent : false, + width:"50%" }); twitter.addEventListener("click",function(e){ var data = talkItem.get('url') + Alloy.CFG.hastag; @@ -81,6 +87,9 @@ rowViewLeft.add(title); for(var k = 0; k < speakers.length; k++){ var speaker = Ti.UI.createLabel({touchEnabled : false, bubbleParent: true, text : speakers[k].name + " " + speakers[k].surname}); $.addClass(speaker,"listSpeaker"); + if(Alloy.Globals.isAndroidTablet){ + $.addClass(speaker,"listSpeakerTablet"); + } rowViewLeft.add(speaker); } headerView.add(rowViewLeft); @@ -91,6 +100,9 @@ var subHeaderView = Ti.UI.createView({layout: "horizontal"}); $.addClass(subHeaderView,"subHeaderView"); var category = Ti.UI.createLabel({touchEnabled : false, bubbleParent: true, text : talkItem.get('category')}); $.addClass(category,"category"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(category,"categoryTablet"); +} subHeaderView.add(category); var viewLevel = Ti.UI.createView({layout: "vertical"}); $.addClass(viewLevel,"viewLevel"); @@ -103,6 +115,9 @@ for(var i = 1; i < 4; i++){ } levelLabel = Ti.UI.createLabel({text: "livello"}); $.addClass(levelLabel,"levelLabel"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(levelLabel,"levelLabelTablet"); +} viewLevel.add(viewLevelImages); viewLevel.add(levelLabel); subHeaderView.add(viewLevel); @@ -111,6 +126,9 @@ $.talkDetail.add(subHeaderView); var body = Ti.UI.createLabel({bubbleParent: true, text : talkItem.get('body')}); $.addClass(body,"body"); +if(Alloy.Globals.isAndroidTablet){ + $.addClass(body,"bodyTablet"); +} var scrollView = Ti.UI.createScrollView({layout: 'vertical', scrollType : 'vertical', top: "5%"}); scrollView.add(body); $.talkDetail.add(scrollView); diff --git a/app/styles/app.tss b/app/styles/app.tss index 23d111b..90d25ef 100644 --- a/app/styles/app.tss +++ b/app/styles/app.tss @@ -10,7 +10,7 @@ color : Alloy.CFG.colors.first, left: "0" } -".listTitle[if=Alloy.Globals.isAndroidTablet]" : { +".listTitleTablet" : { font : { fontSize : "37sp", fontFamily : Alloy.Globals.museo_slab_700 @@ -27,7 +27,7 @@ top: "5dp", bottom : "5dp" } -".listDate[if=Alloy.Globals.isAndroidTablet]" : { +".listDateTablet" : { font : { fontSize : "37sp", fontFamily : Alloy.Globals.museo_slab_700 @@ -74,7 +74,7 @@ left: "5%", top: "5dp", } -".scheduleDate[if=Alloy.Globals.isAndroidTablet]" : { +".scheduleDateTablet" : { font : { fontSize : "25sp", fontFamily : Alloy.Globals.museo_slab_700 @@ -89,7 +89,7 @@ left: "5%", bottom : "5dp", }, -".listSpeaker[if=Alloy.Globals.isAndroidTablet]" : { +".listSpeakerTablet" : { font : { fontSize : "22sp", fontFamily : Alloy.Globals.museo_slab_700 @@ -105,16 +105,15 @@ bottom : "5dp", color: Alloy.CFG.colors.first } -".listTrack[if=Alloy.Globals.isAndroidTablet]" : { +".listTrackTablet" : { font : { fontSize : "22sp", fontFamily : Alloy.Globals.museo_slab_500 }, } ".favorite" : { - right: "5%", top : "5dp", - width: "80%" + width: "50%" } ".listTitleSession" : { left: "5%", @@ -124,7 +123,7 @@ }, textAlign : "left", } -".listTitleSession[if=Alloy.Globals.isAndroidTablet]" : { +".listTitleSessionTablet" : { font : { fontSize : "33sp", }, diff --git a/app/styles/blog.tss b/app/styles/blog.tss index 783ad6d..1c0c252 100644 --- a/app/styles/blog.tss +++ b/app/styles/blog.tss @@ -6,8 +6,8 @@ ".blogView" : { backgroundColor : Alloy.CFG.colors.first } -".rowSeparator" : { +".rowSeparatorBlog" : { backgroundColor : Alloy.CFG.colors.third, - width: "100%", height : "5dp", + width: "100%", } \ No newline at end of file diff --git a/app/styles/countdown.tss b/app/styles/countdown.tss index 5db283e..ac7cd12 100644 --- a/app/styles/countdown.tss +++ b/app/styles/countdown.tss @@ -26,10 +26,10 @@ textAlign: "center" } "Label[if=Alloy.Globals.isAndroidTablet]" : { - font : { - fontSize : "30sp", - fontFamily : Alloy.Globals.museo_slab_700 - }, + font : { + fontSize : "30sp", + fontFamily : Alloy.Globals.museo_slab_700 + }, } "#countdown" : { width: "100%", @@ -71,10 +71,10 @@ color : Alloy.CFG.colors.second, } ".hashtag[if=Alloy.Globals.isAndroidTablet]" : { - font : { - fontSize : "30sp", - fontFamily : Alloy.Globals.museo_slab_700 - }, + font : { + fontSize : "30sp", + fontFamily : Alloy.Globals.museo_slab_700 + }, } ".socialLink" : { width : "15%", diff --git a/app/styles/location.tss b/app/styles/location.tss index e7506ff..cb4c17e 100644 --- a/app/styles/location.tss +++ b/app/styles/location.tss @@ -28,7 +28,7 @@ }, color : Alloy.CFG.colors.second, } -".error[if=Alloy.Globals.isAndroidTablet]" : { +".errorTablet" : { font : { fontSize : "37sp", fontFamily : Alloy.Globals.museo_slab_700 diff --git a/app/styles/schedule_group.tss b/app/styles/schedule_group.tss index 9d724f7..4424c48 100644 --- a/app/styles/schedule_group.tss +++ b/app/styles/schedule_group.tss @@ -1,9 +1,4 @@ -".labelTab" : { - color : Alloy.CFG.colors.third, - font: { - fontSize : "25sp", - fontFamily : Alloy.Globals.museo_slab_300 - }, +".tab" : { borderWidth: "1dp", borderColor: "#fff", backgroundColor: Alloy.CFG.colors.first, @@ -13,9 +8,15 @@ color : Alloy.CFG.colors.third, font: { fontSize : "25sp", - fontFamily : Alloy.Globals.museo_slab_300 + fontFamily : Alloy.Globals.museosans_300 }, }, +".labelTab[if=Alloy.Globals.isAndroidTablet]" : { + font : { + fontSize : "37sp", + fontFamily : Alloy.Globals.museosans_300 + }, +} ".tabActive" : { backgroundColor: Alloy.CFG.colors.second, borderWidth: "1dp", diff --git a/app/styles/speakerDetail.tss b/app/styles/speakerDetail.tss index 4cde53c..fb1b6b2 100644 --- a/app/styles/speakerDetail.tss +++ b/app/styles/speakerDetail.tss @@ -20,7 +20,7 @@ }, color : Alloy.CFG.colors.first, }, -".body[if=Alloy.Globals.isAndroidTablet]" : { +".bodyTablet" : { font : { fontSize : "30sp", fontFamily : Alloy.Globals.museo_slab_700 diff --git a/app/styles/sponsor.tss b/app/styles/sponsor.tss index 7cd075a..88a77b8 100644 --- a/app/styles/sponsor.tss +++ b/app/styles/sponsor.tss @@ -6,7 +6,7 @@ color : Alloy.CFG.colors.third, textAlign : "center" }, -".sponsorType[if=Alloy.Globals.isAndroidTablet]" : { +".sponsorTypeTablet" : { font : { fontSize : "37sp", fontFamily : Alloy.Globals.museo_slab_700 diff --git a/app/styles/talkDetail.tss b/app/styles/talkDetail.tss index e37047d..3793dcb 100644 --- a/app/styles/talkDetail.tss +++ b/app/styles/talkDetail.tss @@ -25,10 +25,10 @@ }, color : Alloy.CFG.colors.first, }, -".body[if=Alloy.Globals.isAndroidTablet]" : { +".bodyTablet" : { font : { fontSize : "30sp", - fontFamily : Alloy.Globals.museo_slab_300 + fontFamily : Alloy.Globals.museosans_300 }, } ".category" : { @@ -40,7 +40,7 @@ left: "5%", width : "55%" }, -".category[if=Alloy.Globals.isAndroidTablet]" : { +".categoryTablet" : { font : { fontSize : "30sp", fontFamily : Alloy.Globals.museo_slab_700 @@ -58,7 +58,7 @@ textAlign: "center", color: Alloy.CFG.colors.first } -".levelLabel[if=Alloy.Globals.isAndroidTablet]" : { +".levelLabelTablet" : { font : { fontSize : "22sp", fontFamily : Alloy.Globals.museo_slab_500