o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1392321407.538499: @value"µ {I" class:EFI"BundledAsset;FI"logical_path;FI"iugu-ux/iugu-ui-helpers.js;TI" pathname;FI"a/Users/nkr/Projetos/Iugu/iugu-ux/vendor/assets/javascripts/iugu-ux/iugu-ui-helpers.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2014-01-14T09:59:34-02:00;FI" length;FiÉ I" digest;F"%7ec70e6f67cd0066ad5facb383af9e99I" source;FI"É (function() { IuguUI.Helpers = (function() { function Helpers() {} Helpers.formatISO8601Date = function(date) { var dt; if (!date) { return ""; } dt = date.split('-'); if (dt.length < 3) { return ""; } return "" + dt[2] + "/" + dt[1] + "/" + dt[0]; }; Helpers.formatISO8601DateTime = function(datetime) { var date, time; if (!datetime) { return ""; } datetime = datetime.split('T'); date = datetime[0]; time = datetime[1].split('-')[0]; return "" + time + " " + (this.formatISO8601Date(date)); }; Helpers.bindNavigatorToCollection = function(collection, navigator, context) { var gotoNextPage, gotoPage, gotoPreviousPage; navigator.context = function() { var info; info = collection.info(); return { currentPage: info.currentPage, firstPage: info.firstPage, lastPage: info.lastPage }; }; gotoNextPage = function() { return collection.gotoNext(); }; gotoPreviousPage = function() { return collection.gotoPrevious(); }; gotoPage = function() { return collection.gotoPage(navigator.currentPage().val()); }; navigator.collection = collection; context.on(navigator.identifier() + 'next', gotoNextPage, context); context.on(navigator.identifier() + 'previous', gotoPreviousPage, context); context.on(navigator.identifier() + 'change-page', gotoPage, context); collection.on('all', navigator.render, navigator); return collection.on('changed-page:success', navigator.setFocus, navigator); }; Helpers.bindPaginatorToCollection = function(collection, paginator, context) { var gotoNextPage, gotoPage, gotoPreviousPage; paginator.context = function() { return { currentPage: collection.info().currentPage, firstPage: collection.info().firstPage, lastPage: collection.info().lastPage, pageButtons: this.pageButtonsToShow(paginator.options.numberOfPageButtons, collection.info().firstPage, collection.info().lastPage, collection.info().currentPage), enableAdditionalButtons: paginator.options.enableAdditionalButtons }; }; gotoNextPage = function() { return collection.gotoNext(); }; gotoPreviousPage = function() { return collection.gotoPrevious(); }; gotoPage = function() { return collection.gotoPage(paginator.currentPage); }; paginator.collection = collection; context.on(paginator.identifier() + 'next', gotoNextPage, context); context.on(paginator.identifier() + 'previous', gotoPreviousPage, context); context.on(paginator.identifier() + 'change-page', gotoPage, context); return collection.on('all', paginator.render, paginator); }; return Helpers; })(); this.IuguUI.Helpers = IuguUI.Helpers; }).call(this); ;FI"required_assets_digest;F"%9539fdca17d0255358ffd429b73b0f36I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862