Permalink
Browse files

[ ! ] Some fixes and Releasing 0.9.3

  • Loading branch information...
1 parent f515adb commit c978f3d3c7276305c6ea130cacfc196ac379f269 @pnegri pnegri committed Mar 6, 2013
View
@@ -1,3 +1,3 @@
module IuguUX
- VERSION = "0.9.2"
+ VERSION = "0.9.3"
end
@@ -7,3 +7,5 @@ var api_base = 'http://iugu-ux.dev/';
var subdomain_xdr_url = '';
var app_root = '/';
+
+var enable_debug_events = false;
@@ -1,11 +1,5 @@
-RootView = Backbone.View.extend
+class RootView extends IuguUI.View
el: "#app"
- initialize: ->
- _.bindAll @, 'render'
-
- render: ->
- $(@el).html JST["web-app/presenters/main-view"]
-
- @
+ layout: "main-view"
@RootView = RootView
@@ -1,7 +1,7 @@
MainRouter = Backbone.Router.extend
initialize: ->
- window.Root = new window.RootView()
- window.Root.render() if window.Root
+ window.app.rootWindow = new window.RootView()
+ window.app.rootWindow.render() if window.app.rootWindow
routes:
"" : "index"
@@ -1,10 +1,10 @@
var BrowserDetect = {
init: function () {
- this.browser = this.searchString(this.dataBrowser) || "unknow";
+ this.browser = this.searchString(this.dataBrowser) || "unknown";
this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion)
|| "unknown_version";
- this.OS = this.searchString(this.dataOS) || "unknow_os";
+ this.OS = this.searchString(this.dataOS) || "unknown_os";
},
searchString: function (data) {
for (var i=0;i<data.length;i++) {
@@ -132,6 +132,7 @@ $( function() {
window.IS_DESKTOP = false;
window.IS_IOS = false;
window.IS_ANDROID = false;
+ window.IS_DEPRECATED_ANDROID = false;
$("html").removeClass("no-js").addClass("js");
$("html").removeClass("not-ready").addClass("ready");
@@ -150,6 +151,7 @@ $( function() {
if (androidversion < 3)
{
$("html").addClass( 'deprecated_android' );
+ window.IS_DEPRECATED_ANDROID = true;
}
}
@@ -18,17 +18,42 @@ class IuguUI.Base extends Backbone.View
@
+ handleDeprecated: ->
+ if window.app._iscroll_instances == undefined
+ window.app._iscroll_instances = []
+
+ unless window.IS_DEPRECATED_ANDROID
+ return
+
+ @$(".handle-scrolling").each( (index,handle_scrolling_elm) ->
+ elm = handle_scrolling_elm.parentNode
+ if $(handle_scrolling_elm).attr("initialized") != true
+ $(handle_scrolling_elm).css('overflow-y','visible')
+ $(handle_scrolling_elm).css('height','auto')
+ $(handle_scrolling_elm).attr("initialized",true)
+ window.app._iscroll_instances.push( new iScroll( elm, { hideScrollbar: false, hScroll: false } ) )
+ )
+
render: ->
$(@el).html @getLayout() @context()
if @className
$(@el).addClass @className
+ @handleDeprecated()
+
+ if window.app._iscroll_instances
+ for iscroll in window.app._iscroll_instances
+ if iscroll.wrapper
+ iscroll.refresh()
+
@
renderPartial: ( layout, target, context=@context ) ->
$(target).html @getLayout(target) context
+ @handleDeprecated()
+
getLayout: (layout_file=@layout) ->
if JST[ "web-app/presenters/" + layout_file ]
return JST[ "web-app/presenters/" + layout_file ]
@@ -12,6 +12,7 @@
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
+//= require_self
//= require web-app/environment
//= require web-app/config
//= require web-app/comm
@@ -29,3 +30,4 @@
//= require web-app/models
//= require web-app/presenters
//= require web-app/usecode
+IuguUI = {}
@@ -28,3 +28,4 @@
//= require ./vendor/rivets.js
//= require ./vendor/async.js
//= require ./vendor/tasks.js
+//= require ./vendor/iscroll.js
Oops, something went wrong.

0 comments on commit c978f3d

Please sign in to comment.