event_calendar_engine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +23 -0
- data/Gemfile.lock +161 -0
- data/README +1 -0
- data/Rakefile +39 -0
- data/VERSION +1 -0
- data/app/controllers/application_controller.rb +4 -0
- data/app/controllers/attendees_controller.rb +53 -0
- data/app/controllers/event_calendar/application_controller.rb +5 -0
- data/app/controllers/event_revisions_controller.rb +26 -0
- data/app/controllers/events_controller.rb +129 -0
- data/app/helpers/event_calendar/application_helper.rb +118 -0
- data/app/helpers/events_helper.rb +2 -0
- data/app/models/attendee.rb +6 -0
- data/app/models/deletable_instance_methods.rb +7 -0
- data/app/models/event.rb +124 -0
- data/app/models/event_revision.rb +9 -0
- data/app/models/participant.rb +23 -0
- data/app/models/participator.rb +20 -0
- data/app/views/attendees/index.html.erb +14 -0
- data/app/views/attendees/new.html.erb +13 -0
- data/app/views/event-calendar-shared/_flash.html.erb +7 -0
- data/app/views/event-calendar-shared/_main_menu.html.erb +3 -0
- data/app/views/event-calendar-shared/_navigation.html.erb +15 -0
- data/app/views/event_revisions/index.html.erb +31 -0
- data/app/views/event_revisions/show.html.erb +5 -0
- data/app/views/events/_browse_event_revisions.html.erb +19 -0
- data/app/views/events/_event.html.erb +10 -0
- data/app/views/events/_event_details.html.erb +26 -0
- data/app/views/events/_form.html.erb +36 -0
- data/app/views/events/attendees.html.erb +29 -0
- data/app/views/events/edit.html.erb +3 -0
- data/app/views/events/index.html.erb +41 -0
- data/app/views/events/new.html.erb +3 -0
- data/app/views/events/search.html.erb +11 -0
- data/app/views/events/show.html.erb +30 -0
- data/app/views/layouts/application.html.erb +49 -0
- data/config/application.rb +42 -0
- data/config/blueprint_settings.yml +10 -0
- data/config/boot.rb +13 -0
- data/config/cucumber.yml +8 -0
- data/config/database.example.yml +22 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +26 -0
- data/config/environments/production.rb +49 -0
- data/config/environments/test.rb +38 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/formtastic.rb +55 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +9 -0
- data/config/initializers/session_store.rb +10 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +67 -0
- data/db/migrate/20101011142543_create_events.rb +19 -0
- data/db/migrate/20101011172027_create_attendees.rb +16 -0
- data/db/migrate/20101011200048_make_events_revisable.rb +25 -0
- data/db/schema.rb +45 -0
- data/db/seeds.rb +7 -0
- data/lib/event_calendar.rb +3 -0
- data/lib/event_calendar/engine.rb +25 -0
- data/lib/generators/event_calendar/install/USAGE +5 -0
- data/lib/generators/event_calendar/install/install_generator.rb +19 -0
- data/lib/generators/event_calendar/install/templates/event_calendar.rake +169 -0
- data/lib/tasks/blueprint.rake +25 -0
- data/lib/tasks/cucumber.rake +53 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/rails.png +0 -0
- data/public/javascripts/event_calendar.js +62 -0
- data/public/javascripts/event_calendar_behaviors.js +131 -0
- data/public/javascripts/fullcalendar.js +3965 -0
- data/public/javascripts/jquery-ui-1.7.2.custom.min.js +298 -0
- data/public/javascripts/jquery.clonePosition.js +27 -0
- data/public/javascripts/jquery.js +154 -0
- data/public/javascripts/jquery.qtip-1.0.0-rc3.js +2149 -0
- data/public/javascripts/jquery.string.1.0-min.js +6 -0
- data/public/javascripts/jquery.tablesorter.min.js +2 -0
- data/public/javascripts/lowpro.jquery.js +224 -0
- data/public/javascripts/rails.js +132 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/blueprint/grid.css +280 -0
- data/public/stylesheets/blueprint/icons/cross.png +0 -0
- data/public/stylesheets/blueprint/icons/doc.png +0 -0
- data/public/stylesheets/blueprint/icons/email.png +0 -0
- data/public/stylesheets/blueprint/icons/external.png +0 -0
- data/public/stylesheets/blueprint/icons/feed.png +0 -0
- data/public/stylesheets/blueprint/icons/im.png +0 -0
- data/public/stylesheets/blueprint/icons/key.png +0 -0
- data/public/stylesheets/blueprint/icons/pdf.png +0 -0
- data/public/stylesheets/blueprint/icons/tick.png +0 -0
- data/public/stylesheets/blueprint/icons/visited.png +0 -0
- data/public/stylesheets/blueprint/icons/xls.png +0 -0
- data/public/stylesheets/blueprint/ie.css +36 -0
- data/public/stylesheets/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/public/stylesheets/blueprint/plugins/buttons/icons/key.png +0 -0
- data/public/stylesheets/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/public/stylesheets/blueprint/plugins/buttons/readme.txt +32 -0
- data/public/stylesheets/blueprint/plugins/buttons/screen.css +97 -0
- data/public/stylesheets/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/public/stylesheets/blueprint/plugins/fancy-type/screen.css +71 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/public/stylesheets/blueprint/plugins/link-icons/readme.txt +18 -0
- data/public/stylesheets/blueprint/plugins/link-icons/screen.css +40 -0
- data/public/stylesheets/blueprint/plugins/rtl/readme.txt +10 -0
- data/public/stylesheets/blueprint/plugins/rtl/screen.css +110 -0
- data/public/stylesheets/blueprint/plugins/silksprite/sprite.css +1 -0
- data/public/stylesheets/blueprint/plugins/silksprite/sprites.png +0 -0
- data/public/stylesheets/blueprint/print.css +29 -0
- data/public/stylesheets/blueprint/readme.txt +12 -0
- data/public/stylesheets/blueprint/screen.css +429 -0
- data/public/stylesheets/error_messages.css +65 -0
- data/public/stylesheets/formtastic.css +131 -0
- data/public/stylesheets/formtastic_changes.css +14 -0
- data/public/stylesheets/fullcalendar.css +574 -0
- data/public/stylesheets/fullcalendar_changes.css +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/smoothness/jquery-ui-1.7.2.custom.css +406 -0
- data/public/stylesheets/tablesorter/blue/asc.gif +0 -0
- data/public/stylesheets/tablesorter/blue/bg.gif +0 -0
- data/public/stylesheets/tablesorter/blue/desc.gif +0 -0
- data/public/stylesheets/tablesorter/blue/style.css +39 -0
- data/public/stylesheets/text_and_colors.css +49 -0
- data/spec/controllers/attendees_controller_spec.rb +27 -0
- data/spec/controllers/event_revisions_controller_spec.rb +86 -0
- data/spec/controllers/events_controller_spec.rb +168 -0
- data/spec/fixtures/event_calendar_events.yml +8 -0
- data/spec/models/deletable_instance_methods_spec.rb +61 -0
- data/spec/models/event_revision_spec.rb +36 -0
- data/spec/models/event_spec.rb +139 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/spec_helpers/mocks.rb +6 -0
- data/vendor/plugins/searchable_by/MIT-LICENSE +20 -0
- data/vendor/plugins/searchable_by/README +55 -0
- data/vendor/plugins/searchable_by/Rakefile +23 -0
- data/vendor/plugins/searchable_by/init.rb +2 -0
- data/vendor/plugins/searchable_by/install.rb +1 -0
- data/vendor/plugins/searchable_by/lib/searchable_by.rb +137 -0
- data/vendor/plugins/searchable_by/tasks/searchable_by_tasks.rake +4 -0
- data/vendor/plugins/searchable_by/test/boot.rb +21 -0
- data/vendor/plugins/searchable_by/test/database.yml +22 -0
- data/vendor/plugins/searchable_by/test/fixtures/companies.yml +10 -0
- data/vendor/plugins/searchable_by/test/fixtures/company.rb +5 -0
- data/vendor/plugins/searchable_by/test/fixtures/employee.rb +5 -0
- data/vendor/plugins/searchable_by/test/fixtures/employees.yml +28 -0
- data/vendor/plugins/searchable_by/test/fixtures/schema.rb +18 -0
- data/vendor/plugins/searchable_by/test/helper.rb +12 -0
- data/vendor/plugins/searchable_by/test/lib/activerecord_test_case.rb +43 -0
- data/vendor/plugins/searchable_by/test/lib/activerecord_test_connector.rb +75 -0
- data/vendor/plugins/searchable_by/test/lib/load_fixtures.rb +9 -0
- data/vendor/plugins/searchable_by/test/searchable_by_test.rb +73 -0
- data/vendor/plugins/searchable_by/uninstall.rb +1 -0
- metadata +606 -0
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* jquery.string - Prototype string functions for jQuery
|
3
|
+
* (c) 2008 David E. Still (http://stilldesigning.com)
|
4
|
+
* Original Prototype extensions (c) 2005-2008 Sam Stephenson (http://prototypejs.org)
|
5
|
+
*/
|
6
|
+
jQuery.__stringPrototype={JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"},blank:function(A){return/^\s*$/.test(this.s(A)||" ")},camelize:function(C){var A=this.s(C).split("-"),B;C=[A[0]];for(B=1;B<A.length;B++){C.push(A[B].charAt(0).toUpperCase()+A[B].substring(1))}C=C.join("");return this.r(arguments,0,C)},capitalize:function(A){A=this.s(A);A=A.charAt(0).toUpperCase()+A.substring(1).toLowerCase();return this.r(arguments,0,A)},dasherize:function(A){A=this.s(A).split("_").join("-");return this.r(arguments,0,A)},empty:function(A){return this.s(A)===""},endsWith:function(B,A){A=this.s(A);var C=A.length-B.length;return C>=0&&A.lastIndexOf(B)===C},escapeHTML:function(A){A=this.s(A).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return this.r(arguments,0,A)},evalJSON:function(sanitize,s){s=this.s(s);var json=this.unfilterJSON(false,s);try{if(!sanitize||this.isJSON(json)){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+s)},evalScripts:function(s){var scriptTags=this.extractScripts(this.s(s)),results=[];if(scriptTags.length>0){for(var i=0;i<scriptTags.length;i++){results.push(eval(scriptTags[i]))}}return results},extractScripts:function(C){var E=new RegExp(this.ScriptFragment,"img"),D=new RegExp(this.ScriptFragment,"im"),A=this.s(C).match(E)||[],F=[];if(A.length>0){for(var B=0;B<A.length;B++){F.push(A[B].match(D)[1]||"")}}return F},gsub:function(C,B,A){A=this.s(A);if(jQuery.isFunction(B)){A=this.sub(C,B,-1,A)}else{A=A.split(C).join(B)}return this.r(arguments,2,A)},include:function(B,A){return this.s(A).indexOf(B)>-1},inspect:function(B,C){C=this.s(C);var A;try{A=this.sub(/[\x00-\x1f\\]/,function(E){var F=jQuery.__stringPrototype.specialChar[E[0]];return F?F:"\\u00"+E[0].charCodeAt().toPaddedString(2,16)},-1,C)}catch(D){A=C}C=(B)?'"'+A.replace(/"/g,'\\"')+'"':"'"+A.replace(/'/g,"\\'")+"'";return this.r(arguments,1,C)},interpolate:function(F,E,C){C=this.s(C);if(!E){E=/(\#\{\s*(\w+)\s*\})/}var A=new RegExp(E.source,"g");var D=C.match(A),B;for(B=0;B<D.length;B++){C=C.replace(D[B],F[D[B].match(E)[2]])}return this.r(arguments,2,C)},isJSON:function(A){A=this.s(A);if(this.blank(A)){return false}A=A.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},scan:function(C,B,A){A=this.s(A);this.sub(C,B,-1,A);return this.r(arguments,2,A)},startsWith:function(B,A){return this.s(A).indexOf(B)===0},strip:function(A){A=jQuery.trim(this.s(A));return this.r(arguments,0,A)},stripScripts:function(A){A=this.s(A).replace(new RegExp(this.ScriptFragment,"img"),"");return this.r(arguments,0,A)},stripTags:function(A){A=this.s(A).replace(/<\/?[^>]+>/gi,"");return this.r(arguments,0,A)},sub:function(H,D,E,C){C=this.s(C);if(H.source&&!H.global){var A=(H.ignoreCase)?"ig":"g";A+=(H.multiline)?"m":"";H=new RegExp(H.source,A)}var G=C.split(H),F=C.match(H);if(jQuery.browser.msie){if(C.indexOf(F[0])==0){G.unshift("")}if(C.lastIndexOf(F[F.length-1])==C.length-F[F.length-1].length){G.push("")}}E=(E<0)?(G.length-1):E||1;C=G[0];for(var B=1;B<G.length;B++){if(B<=E){if(jQuery.isFunction(D)){C+=D(F[B-1]||F)+G[B]}else{C+=D+G[B]}}else{C+=(F[B-1]||F)+G[B]}}return this.r(arguments,3,C)},succ:function(A){A=this.s(A);A=A.slice(0,A.length-1)+String.fromCharCode(A.charCodeAt(A.length-1)+1);return this.r(arguments,0,A)},times:function(D,C){C=this.s(C);var A="";for(var B=0;B<D;B++){A+=C}return this.r(arguments,1,A)},toJSON:function(A){return this.r(arguments,0,this.inspect(true,this.s(A)))},toQueryParams:function(F,C){C=this.s(C);var E=C.substring(C.indexOf("?")+1).split("#")[0].split(F||"&"),H={},B,A,D,G;for(B=0;B<E.length;B++){G=E[B].split("=");A=decodeURIComponent(G[0]);D=(G[1])?decodeURIComponent(G[1]):undefined;if(H[A]){if(typeof H[A]=="string"){H[A]=[H[A]]}H[A].push(D)}else{H[A]=D}}return H},truncate:function(C,A,B){B=this.s(B);C=C||30;A=(!A)?"...":A;B=(B.length>C)?B.slice(0,C-A.length)+A:String(B);return this.r(arguments,2,B)},underscore:function(A){A=this.sub(/[A-Z]/,function(B){return"_"+B.toLowerCase()},-1,this.s(A));if(A.charAt(0)=="_"){A=A.substring(1)}return this.r(arguments,0,A)},unescapeHTML:function(A){A=this.stripTags(this.s(A)).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return this.r(arguments,0,A)},unfilterJSON:function(C,B){B=this.s(B);C=C||this.JSONFilter;var A=B.match(C);B=(A!==null)?A[1]:B;return this.r(arguments,1,jQuery.trim(B))},r:function(A,B,C){if(A.length>B||this.str===undefined){return C}else{this.str=""+C;return this}},s:function(A){if(A===""||A){return A}if(this.str===""||this.str){return this.str}return this}};jQuery.__stringPrototype.parseQuery=jQuery.__stringPrototype.toQueryParams;jQuery.string=function(A){if(A===String.prototype){jQuery.extend(String.prototype,jQuery.__stringPrototype)}else{return jQuery.extend({str:A},jQuery.__stringPrototype)}}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
|
2
|
+
(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
|
@@ -0,0 +1,224 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
var addMethods = function(source) {
|
4
|
+
var ancestor = this.superclass && this.superclass.prototype;
|
5
|
+
var properties = $.keys(source);
|
6
|
+
|
7
|
+
if (!$.keys({ toString: true }).length) properties.push("toString", "valueOf");
|
8
|
+
|
9
|
+
for (var i = 0, length = properties.length; i < length; i++) {
|
10
|
+
var property = properties[i], value = source[property];
|
11
|
+
if (ancestor && $.isFunction(value) && $.argumentNames(value)[0] == "$super") {
|
12
|
+
|
13
|
+
var method = value, value = $.extend($.wrap((function(m) {
|
14
|
+
return function() { return ancestor[m].apply(this, arguments) };
|
15
|
+
})(property), method), {
|
16
|
+
valueOf: function() { return method },
|
17
|
+
toString: function() { return method.toString() }
|
18
|
+
});
|
19
|
+
}
|
20
|
+
this.prototype[property] = value;
|
21
|
+
}
|
22
|
+
|
23
|
+
return this;
|
24
|
+
}
|
25
|
+
|
26
|
+
$.extend({
|
27
|
+
keys: function(obj) {
|
28
|
+
var keys = [];
|
29
|
+
for (var key in obj) keys.push(key);
|
30
|
+
return keys;
|
31
|
+
},
|
32
|
+
|
33
|
+
argumentNames: function(func) {
|
34
|
+
var names = func.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(/, ?/);
|
35
|
+
return names.length == 1 && !names[0] ? [] : names;
|
36
|
+
},
|
37
|
+
|
38
|
+
bind: function(func, scope) {
|
39
|
+
return function() {
|
40
|
+
return func.apply(scope, $.makeArray(arguments));
|
41
|
+
}
|
42
|
+
},
|
43
|
+
|
44
|
+
wrap: function(func, wrapper) {
|
45
|
+
var __method = func;
|
46
|
+
return function() {
|
47
|
+
return wrapper.apply(this, [$.bind(__method, this)].concat($.makeArray(arguments)));
|
48
|
+
}
|
49
|
+
},
|
50
|
+
|
51
|
+
klass: function() {
|
52
|
+
var parent = null, properties = $.makeArray(arguments);
|
53
|
+
if ($.isFunction(properties[0])) parent = properties.shift();
|
54
|
+
|
55
|
+
var klass = function() {
|
56
|
+
this.initialize.apply(this, arguments);
|
57
|
+
};
|
58
|
+
|
59
|
+
klass.superclass = parent;
|
60
|
+
klass.subclasses = [];
|
61
|
+
klass.addMethods = addMethods;
|
62
|
+
|
63
|
+
if (parent) {
|
64
|
+
var subclass = function() { };
|
65
|
+
subclass.prototype = parent.prototype;
|
66
|
+
klass.prototype = new subclass;
|
67
|
+
parent.subclasses.push(klass);
|
68
|
+
}
|
69
|
+
|
70
|
+
for (var i = 0; i < properties.length; i++)
|
71
|
+
klass.addMethods(properties[i]);
|
72
|
+
|
73
|
+
if (!klass.prototype.initialize)
|
74
|
+
klass.prototype.initialize = function() {};
|
75
|
+
|
76
|
+
klass.prototype.constructor = klass;
|
77
|
+
|
78
|
+
return klass;
|
79
|
+
},
|
80
|
+
delegate: function(rules) {
|
81
|
+
return function(e) {
|
82
|
+
var target = $(e.target), parent = null;
|
83
|
+
for (var selector in rules) {
|
84
|
+
if (target.is(selector) || ((parent = target.parents(selector)) && parent.length > 0)) {
|
85
|
+
return rules[selector].apply(this, [parent || target].concat($.makeArray(arguments)));
|
86
|
+
}
|
87
|
+
parent = null;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
});
|
92
|
+
|
93
|
+
var bindEvents = function(instance) {
|
94
|
+
for (var member in instance) {
|
95
|
+
if (member.match(/^on(.+)/) && typeof instance[member] == 'function') {
|
96
|
+
instance.element.bind(RegExp.$1, $.bind(instance[member], instance));
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
var behaviorWrapper = function(behavior) {
|
102
|
+
return $.klass(behavior, {
|
103
|
+
initialize: function($super, element, args) {
|
104
|
+
this.element = $(element);
|
105
|
+
if ($super) $super.apply(this, args);
|
106
|
+
}
|
107
|
+
});
|
108
|
+
}
|
109
|
+
|
110
|
+
var attachBehavior = function(el, behavior, args) {
|
111
|
+
var wrapper = behaviorWrapper(behavior);
|
112
|
+
instance = new wrapper(el, args);
|
113
|
+
|
114
|
+
bindEvents(instance);
|
115
|
+
|
116
|
+
if (!behavior.instances) behavior.instances = [];
|
117
|
+
|
118
|
+
behavior.instances.push(instance);
|
119
|
+
|
120
|
+
return instance;
|
121
|
+
};
|
122
|
+
|
123
|
+
|
124
|
+
$.fn.extend({
|
125
|
+
attach: function() {
|
126
|
+
var args = $.makeArray(arguments), behavior = args.shift();
|
127
|
+
|
128
|
+
if ($.livequery && this.selector) {
|
129
|
+
return this.livequery(function() {
|
130
|
+
attachBehavior(this, behavior, args);
|
131
|
+
});
|
132
|
+
} else {
|
133
|
+
return this.each(function() {
|
134
|
+
attachBehavior(this, behavior, args);
|
135
|
+
});
|
136
|
+
}
|
137
|
+
},
|
138
|
+
attachAndReturn: function() {
|
139
|
+
var args = $.makeArray(arguments), behavior = args.shift();
|
140
|
+
|
141
|
+
return $.map(this, function(el) {
|
142
|
+
return attachBehavior(el, behavior, args);
|
143
|
+
});
|
144
|
+
},
|
145
|
+
delegate: function(type, rules) {
|
146
|
+
return this.bind(type, $.delegate(rules));
|
147
|
+
},
|
148
|
+
attached: function(behavior) {
|
149
|
+
var instances = [];
|
150
|
+
|
151
|
+
if (!behavior.instances) return instances;
|
152
|
+
|
153
|
+
this.each(function(i, element) {
|
154
|
+
$.each(behavior.instances, function(i, instance) {
|
155
|
+
if (instance.element.get(0) == element) instances.push(instance);
|
156
|
+
});
|
157
|
+
});
|
158
|
+
|
159
|
+
return instances;
|
160
|
+
},
|
161
|
+
firstAttached: function(behavior) {
|
162
|
+
return this.attached(behavior)[0];
|
163
|
+
}
|
164
|
+
});
|
165
|
+
|
166
|
+
Remote = $.klass({
|
167
|
+
initialize: function(options) {
|
168
|
+
if (this.element.attr('nodeName') == 'FORM') this.element.attach(Remote.Form, options);
|
169
|
+
else this.element.attach(Remote.Link, options);
|
170
|
+
}
|
171
|
+
});
|
172
|
+
|
173
|
+
Remote.Base = $.klass({
|
174
|
+
initialize : function(options) {
|
175
|
+
this.options = options;
|
176
|
+
},
|
177
|
+
_makeRequest : function(options) {
|
178
|
+
$.ajax(options);
|
179
|
+
return false;
|
180
|
+
}
|
181
|
+
});
|
182
|
+
|
183
|
+
Remote.Link = $.klass(Remote.Base, {
|
184
|
+
onclick: function() {
|
185
|
+
var options = $.extend({
|
186
|
+
url: this.element.attr('href'),
|
187
|
+
type: 'GET'
|
188
|
+
}, this.options);
|
189
|
+
return this._makeRequest(options);
|
190
|
+
}
|
191
|
+
});
|
192
|
+
|
193
|
+
Remote.Form = $.klass(Remote.Base, {
|
194
|
+
onclick: function(e) {
|
195
|
+
var target = e.target;
|
196
|
+
|
197
|
+
if ($.inArray(target.nodeName.toLowerCase(), ['input', 'button']) >= 0 && target.type.match(/submit|image/))
|
198
|
+
this._submitButton = target;
|
199
|
+
},
|
200
|
+
onsubmit: function() {
|
201
|
+
var data = this.element.serializeArray();
|
202
|
+
|
203
|
+
if (this._submitButton) data.push({ name: this._submitButton.name, value: this._submitButton.value });
|
204
|
+
|
205
|
+
var options = $.extend({
|
206
|
+
url : this.element.attr('action'),
|
207
|
+
type : this.element.attr('method') || 'GET',
|
208
|
+
data : data
|
209
|
+
}, this.options);
|
210
|
+
|
211
|
+
this._makeRequest(options);
|
212
|
+
|
213
|
+
return false;
|
214
|
+
}
|
215
|
+
});
|
216
|
+
|
217
|
+
$.ajaxSetup({
|
218
|
+
beforeSend: function(xhr) {
|
219
|
+
if (!this.dataType)
|
220
|
+
xhr.setRequestHeader("Accept", "text/javascript, text/html, application/xml, text/xml, */*");
|
221
|
+
}
|
222
|
+
});
|
223
|
+
|
224
|
+
})(jQuery);
|
@@ -0,0 +1,132 @@
|
|
1
|
+
jQuery(function ($) {
|
2
|
+
var csrf_token = $('meta[name=csrf-token]').attr('content'),
|
3
|
+
csrf_param = $('meta[name=csrf-param]').attr('content');
|
4
|
+
|
5
|
+
$.fn.extend({
|
6
|
+
/**
|
7
|
+
* Triggers a custom event on an element and returns the event result
|
8
|
+
* this is used to get around not being able to ensure callbacks are placed
|
9
|
+
* at the end of the chain.
|
10
|
+
*
|
11
|
+
* TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our
|
12
|
+
* own events and placing ourselves at the end of the chain.
|
13
|
+
*/
|
14
|
+
triggerAndReturn: function (name, data) {
|
15
|
+
var event = new $.Event(name);
|
16
|
+
this.trigger(event, data);
|
17
|
+
|
18
|
+
return event.result !== false;
|
19
|
+
},
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Handles execution of remote calls firing overridable events along the way
|
23
|
+
*/
|
24
|
+
callRemote: function () {
|
25
|
+
var el = this,
|
26
|
+
method = el.attr('method') || el.attr('data-method') || 'GET',
|
27
|
+
url = el.attr('action') || el.attr('href'),
|
28
|
+
dataType = el.attr('data-type') || 'script';
|
29
|
+
|
30
|
+
if (url === undefined) {
|
31
|
+
throw "No URL specified for remote call (action or href must be present).";
|
32
|
+
} else {
|
33
|
+
if (el.triggerAndReturn('ajax:before')) {
|
34
|
+
var data = el.is('form') ? el.serializeArray() : [];
|
35
|
+
$.ajax({
|
36
|
+
url: url,
|
37
|
+
data: data,
|
38
|
+
dataType: dataType,
|
39
|
+
type: method.toUpperCase(),
|
40
|
+
beforeSend: function (xhr) {
|
41
|
+
el.trigger('ajax:loading', xhr);
|
42
|
+
},
|
43
|
+
success: function (data, status, xhr) {
|
44
|
+
el.trigger('ajax:success', [data, status, xhr]);
|
45
|
+
},
|
46
|
+
complete: function (xhr) {
|
47
|
+
el.trigger('ajax:complete', xhr);
|
48
|
+
},
|
49
|
+
error: function (xhr, status, error) {
|
50
|
+
el.trigger('ajax:failure', [xhr, status, error]);
|
51
|
+
}
|
52
|
+
});
|
53
|
+
}
|
54
|
+
|
55
|
+
el.trigger('ajax:after');
|
56
|
+
}
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
/**
|
61
|
+
* confirmation handler
|
62
|
+
*/
|
63
|
+
$('a[data-confirm],input[data-confirm]').live('click', function () {
|
64
|
+
var el = $(this);
|
65
|
+
if (el.triggerAndReturn('confirm')) {
|
66
|
+
if (!confirm(el.attr('data-confirm'))) {
|
67
|
+
return false;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
});
|
71
|
+
|
72
|
+
|
73
|
+
/**
|
74
|
+
* remote handlers
|
75
|
+
*/
|
76
|
+
$('form[data-remote]').live('submit', function (e) {
|
77
|
+
$(this).callRemote();
|
78
|
+
e.preventDefault();
|
79
|
+
});
|
80
|
+
|
81
|
+
$('a[data-remote],input[data-remote]').live('click', function (e) {
|
82
|
+
$(this).callRemote();
|
83
|
+
e.preventDefault();
|
84
|
+
});
|
85
|
+
|
86
|
+
$('a[data-method]:not([data-remote])').live('click', function (e){
|
87
|
+
var link = $(this),
|
88
|
+
href = link.attr('href'),
|
89
|
+
method = link.attr('data-method'),
|
90
|
+
form = $('<form method="post" action="'+href+'"></form>'),
|
91
|
+
metadata_input = '<input name="_method" value="'+method+'" type="hidden" />';
|
92
|
+
|
93
|
+
if (csrf_param != null && csrf_token != null) {
|
94
|
+
metadata_input += '<input name="'+csrf_param+'" value="'+csrf_token+'" type="hidden" />';
|
95
|
+
}
|
96
|
+
|
97
|
+
form.hide()
|
98
|
+
.append(metadata_input)
|
99
|
+
.appendTo('body');
|
100
|
+
|
101
|
+
e.preventDefault();
|
102
|
+
form.submit();
|
103
|
+
});
|
104
|
+
|
105
|
+
/**
|
106
|
+
* disable-with handlers
|
107
|
+
*/
|
108
|
+
var disable_with_input_selector = 'input[data-disable-with]';
|
109
|
+
var disable_with_form_remote_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')';
|
110
|
+
var disable_with_form_not_remote_selector = 'form:not([data-remote]):has(' + disable_with_input_selector + ')';
|
111
|
+
|
112
|
+
var disable_with_input_function = function () {
|
113
|
+
$(this).find(disable_with_input_selector).each(function () {
|
114
|
+
var input = $(this);
|
115
|
+
input.data('enable-with', input.val())
|
116
|
+
.attr('value', input.attr('data-disable-with'))
|
117
|
+
.attr('disabled', 'disabled');
|
118
|
+
});
|
119
|
+
};
|
120
|
+
|
121
|
+
$(disable_with_form_remote_selector).live('ajax:before', disable_with_input_function);
|
122
|
+
$(disable_with_form_not_remote_selector).live('submit', disable_with_input_function);
|
123
|
+
|
124
|
+
$(disable_with_form_remote_selector).live('ajax:complete', function () {
|
125
|
+
$(this).find(disable_with_input_selector).each(function () {
|
126
|
+
var input = $(this);
|
127
|
+
input.removeAttr('disabled')
|
128
|
+
.val(input.data('enable-with'));
|
129
|
+
});
|
130
|
+
});
|
131
|
+
|
132
|
+
});
|
data/public/robots.txt
ADDED
@@ -0,0 +1,280 @@
|
|
1
|
+
/* --------------------------------------------------------------
|
2
|
+
|
3
|
+
grid.css
|
4
|
+
* Sets up an easy-to-use grid of 24 columns.
|
5
|
+
|
6
|
+
By default, the grid is 950px wide, with 24 columns
|
7
|
+
spanning 30px, and a 10px margin between columns.
|
8
|
+
|
9
|
+
If you need fewer or more columns, namespaces or semantic
|
10
|
+
element names, use the compressor script (lib/compress.rb)
|
11
|
+
|
12
|
+
-------------------------------------------------------------- */
|
13
|
+
|
14
|
+
/* A container should group all your columns. */
|
15
|
+
.container {
|
16
|
+
width: 950px;
|
17
|
+
margin: 0 auto;
|
18
|
+
}
|
19
|
+
|
20
|
+
/* Use this class on any .span / container to see the grid. */
|
21
|
+
.showgrid {
|
22
|
+
background: url(src/grid.png);
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
/* Columns
|
27
|
+
-------------------------------------------------------------- */
|
28
|
+
|
29
|
+
/* Sets up basic grid floating and margin. */
|
30
|
+
.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {
|
31
|
+
float: left;
|
32
|
+
margin-right: 10px;
|
33
|
+
}
|
34
|
+
|
35
|
+
/* The last column in a row needs this class. */
|
36
|
+
.last { margin-right: 0; }
|
37
|
+
|
38
|
+
/* Use these classes to set the width of a column. */
|
39
|
+
.span-1 {width: 30px;}
|
40
|
+
|
41
|
+
.span-2 {width: 70px;}
|
42
|
+
.span-3 {width: 110px;}
|
43
|
+
.span-4 {width: 150px;}
|
44
|
+
.span-5 {width: 190px;}
|
45
|
+
.span-6 {width: 230px;}
|
46
|
+
.span-7 {width: 270px;}
|
47
|
+
.span-8 {width: 310px;}
|
48
|
+
.span-9 {width: 350px;}
|
49
|
+
.span-10 {width: 390px;}
|
50
|
+
.span-11 {width: 430px;}
|
51
|
+
.span-12 {width: 470px;}
|
52
|
+
.span-13 {width: 510px;}
|
53
|
+
.span-14 {width: 550px;}
|
54
|
+
.span-15 {width: 590px;}
|
55
|
+
.span-16 {width: 630px;}
|
56
|
+
.span-17 {width: 670px;}
|
57
|
+
.span-18 {width: 710px;}
|
58
|
+
.span-19 {width: 750px;}
|
59
|
+
.span-20 {width: 790px;}
|
60
|
+
.span-21 {width: 830px;}
|
61
|
+
.span-22 {width: 870px;}
|
62
|
+
.span-23 {width: 910px;}
|
63
|
+
.span-24 {width:950px; margin-right:0;}
|
64
|
+
|
65
|
+
/* Use these classes to set the width of an input. */
|
66
|
+
input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {
|
67
|
+
border-left-width: 1px;
|
68
|
+
border-right-width: 1px;
|
69
|
+
padding-left: 5px;
|
70
|
+
padding-right: 5px;
|
71
|
+
}
|
72
|
+
|
73
|
+
input.span-1, textarea.span-1 { width: 18px; }
|
74
|
+
input.span-2, textarea.span-2 { width: 58px; }
|
75
|
+
input.span-3, textarea.span-3 { width: 98px; }
|
76
|
+
input.span-4, textarea.span-4 { width: 138px; }
|
77
|
+
input.span-5, textarea.span-5 { width: 178px; }
|
78
|
+
input.span-6, textarea.span-6 { width: 218px; }
|
79
|
+
input.span-7, textarea.span-7 { width: 258px; }
|
80
|
+
input.span-8, textarea.span-8 { width: 298px; }
|
81
|
+
input.span-9, textarea.span-9 { width: 338px; }
|
82
|
+
input.span-10, textarea.span-10 { width: 378px; }
|
83
|
+
input.span-11, textarea.span-11 { width: 418px; }
|
84
|
+
input.span-12, textarea.span-12 { width: 458px; }
|
85
|
+
input.span-13, textarea.span-13 { width: 498px; }
|
86
|
+
input.span-14, textarea.span-14 { width: 538px; }
|
87
|
+
input.span-15, textarea.span-15 { width: 578px; }
|
88
|
+
input.span-16, textarea.span-16 { width: 618px; }
|
89
|
+
input.span-17, textarea.span-17 { width: 658px; }
|
90
|
+
input.span-18, textarea.span-18 { width: 698px; }
|
91
|
+
input.span-19, textarea.span-19 { width: 738px; }
|
92
|
+
input.span-20, textarea.span-20 { width: 778px; }
|
93
|
+
input.span-21, textarea.span-21 { width: 818px; }
|
94
|
+
input.span-22, textarea.span-22 { width: 858px; }
|
95
|
+
input.span-23, textarea.span-23 { width: 898px; }
|
96
|
+
input.span-24, textarea.span-24 { width: 938px; }
|
97
|
+
|
98
|
+
/* Add these to a column to append empty cols. */
|
99
|
+
|
100
|
+
.append-1 { padding-right: 40px;}
|
101
|
+
.append-2 { padding-right: 80px;}
|
102
|
+
.append-3 { padding-right: 120px;}
|
103
|
+
.append-4 { padding-right: 160px;}
|
104
|
+
.append-5 { padding-right: 200px;}
|
105
|
+
.append-6 { padding-right: 240px;}
|
106
|
+
.append-7 { padding-right: 280px;}
|
107
|
+
.append-8 { padding-right: 320px;}
|
108
|
+
.append-9 { padding-right: 360px;}
|
109
|
+
.append-10 { padding-right: 400px;}
|
110
|
+
.append-11 { padding-right: 440px;}
|
111
|
+
.append-12 { padding-right: 480px;}
|
112
|
+
.append-13 { padding-right: 520px;}
|
113
|
+
.append-14 { padding-right: 560px;}
|
114
|
+
.append-15 { padding-right: 600px;}
|
115
|
+
.append-16 { padding-right: 640px;}
|
116
|
+
.append-17 { padding-right: 680px;}
|
117
|
+
.append-18 { padding-right: 720px;}
|
118
|
+
.append-19 { padding-right: 760px;}
|
119
|
+
.append-20 { padding-right: 800px;}
|
120
|
+
.append-21 { padding-right: 840px;}
|
121
|
+
.append-22 { padding-right: 880px;}
|
122
|
+
.append-23 { padding-right: 920px;}
|
123
|
+
|
124
|
+
/* Add these to a column to prepend empty cols. */
|
125
|
+
|
126
|
+
.prepend-1 { padding-left: 40px;}
|
127
|
+
.prepend-2 { padding-left: 80px;}
|
128
|
+
.prepend-3 { padding-left: 120px;}
|
129
|
+
.prepend-4 { padding-left: 160px;}
|
130
|
+
.prepend-5 { padding-left: 200px;}
|
131
|
+
.prepend-6 { padding-left: 240px;}
|
132
|
+
.prepend-7 { padding-left: 280px;}
|
133
|
+
.prepend-8 { padding-left: 320px;}
|
134
|
+
.prepend-9 { padding-left: 360px;}
|
135
|
+
.prepend-10 { padding-left: 400px;}
|
136
|
+
.prepend-11 { padding-left: 440px;}
|
137
|
+
.prepend-12 { padding-left: 480px;}
|
138
|
+
.prepend-13 { padding-left: 520px;}
|
139
|
+
.prepend-14 { padding-left: 560px;}
|
140
|
+
.prepend-15 { padding-left: 600px;}
|
141
|
+
.prepend-16 { padding-left: 640px;}
|
142
|
+
.prepend-17 { padding-left: 680px;}
|
143
|
+
.prepend-18 { padding-left: 720px;}
|
144
|
+
.prepend-19 { padding-left: 760px;}
|
145
|
+
.prepend-20 { padding-left: 800px;}
|
146
|
+
.prepend-21 { padding-left: 840px;}
|
147
|
+
.prepend-22 { padding-left: 880px;}
|
148
|
+
.prepend-23 { padding-left: 920px;}
|
149
|
+
|
150
|
+
|
151
|
+
/* Border on right hand side of a column. */
|
152
|
+
.border {
|
153
|
+
padding-right: 4px;
|
154
|
+
margin-right: 5px;
|
155
|
+
border-right: 1px solid #ddd;
|
156
|
+
}
|
157
|
+
|
158
|
+
/* Border with more whitespace, spans one column. */
|
159
|
+
.colborder {
|
160
|
+
padding-right: 24px;
|
161
|
+
margin-right: 25px;
|
162
|
+
border-right: 1px solid #ddd;
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
/* Use these classes on an element to push it into the
|
167
|
+
next column, or to pull it into the previous column. */
|
168
|
+
|
169
|
+
|
170
|
+
.pull-1 { margin-left: -40px; }
|
171
|
+
.pull-2 { margin-left: -80px; }
|
172
|
+
.pull-3 { margin-left: -120px; }
|
173
|
+
.pull-4 { margin-left: -160px; }
|
174
|
+
.pull-5 { margin-left: -200px; }
|
175
|
+
.pull-6 { margin-left: -240px; }
|
176
|
+
.pull-7 { margin-left: -280px; }
|
177
|
+
.pull-8 { margin-left: -320px; }
|
178
|
+
.pull-9 { margin-left: -360px; }
|
179
|
+
.pull-10 { margin-left: -400px; }
|
180
|
+
.pull-11 { margin-left: -440px; }
|
181
|
+
.pull-12 { margin-left: -480px; }
|
182
|
+
.pull-13 { margin-left: -520px; }
|
183
|
+
.pull-14 { margin-left: -560px; }
|
184
|
+
.pull-15 { margin-left: -600px; }
|
185
|
+
.pull-16 { margin-left: -640px; }
|
186
|
+
.pull-17 { margin-left: -680px; }
|
187
|
+
.pull-18 { margin-left: -720px; }
|
188
|
+
.pull-19 { margin-left: -760px; }
|
189
|
+
.pull-20 { margin-left: -800px; }
|
190
|
+
.pull-21 { margin-left: -840px; }
|
191
|
+
.pull-22 { margin-left: -880px; }
|
192
|
+
.pull-23 { margin-left: -920px; }
|
193
|
+
.pull-24 { margin-left: -960px; }
|
194
|
+
|
195
|
+
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float: left; position:relative;}
|
196
|
+
|
197
|
+
|
198
|
+
.push-1 { margin: 0 -40px 1.5em 40px; }
|
199
|
+
.push-2 { margin: 0 -80px 1.5em 80px; }
|
200
|
+
.push-3 { margin: 0 -120px 1.5em 120px; }
|
201
|
+
.push-4 { margin: 0 -160px 1.5em 160px; }
|
202
|
+
.push-5 { margin: 0 -200px 1.5em 200px; }
|
203
|
+
.push-6 { margin: 0 -240px 1.5em 240px; }
|
204
|
+
.push-7 { margin: 0 -280px 1.5em 280px; }
|
205
|
+
.push-8 { margin: 0 -320px 1.5em 320px; }
|
206
|
+
.push-9 { margin: 0 -360px 1.5em 360px; }
|
207
|
+
.push-10 { margin: 0 -400px 1.5em 400px; }
|
208
|
+
.push-11 { margin: 0 -440px 1.5em 440px; }
|
209
|
+
.push-12 { margin: 0 -480px 1.5em 480px; }
|
210
|
+
.push-13 { margin: 0 -520px 1.5em 520px; }
|
211
|
+
.push-14 { margin: 0 -560px 1.5em 560px; }
|
212
|
+
.push-15 { margin: 0 -600px 1.5em 600px; }
|
213
|
+
.push-16 { margin: 0 -640px 1.5em 640px; }
|
214
|
+
.push-17 { margin: 0 -680px 1.5em 680px; }
|
215
|
+
.push-18 { margin: 0 -720px 1.5em 720px; }
|
216
|
+
.push-19 { margin: 0 -760px 1.5em 760px; }
|
217
|
+
.push-20 { margin: 0 -800px 1.5em 800px; }
|
218
|
+
.push-21 { margin: 0 -840px 1.5em 840px; }
|
219
|
+
.push-22 { margin: 0 -880px 1.5em 880px; }
|
220
|
+
.push-23 { margin: 0 -920px 1.5em 920px; }
|
221
|
+
.push-24 { margin: 0 -960px 1.5em 960px; }
|
222
|
+
|
223
|
+
.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float: left; position:relative;}
|
224
|
+
|
225
|
+
|
226
|
+
/* Misc classes and elements
|
227
|
+
-------------------------------------------------------------- */
|
228
|
+
|
229
|
+
/* In case you need to add a gutter above/below an element */
|
230
|
+
div.prepend-top, .prepend-top {
|
231
|
+
margin-top:1.5em;
|
232
|
+
}
|
233
|
+
div.append-bottom, .append-bottom {
|
234
|
+
margin-bottom:1.5em;
|
235
|
+
}
|
236
|
+
|
237
|
+
/* Use a .box to create a padded box inside a column. */
|
238
|
+
.box {
|
239
|
+
padding: 1.5em;
|
240
|
+
margin-bottom: 1.5em;
|
241
|
+
background: #e5eCf9;
|
242
|
+
}
|
243
|
+
|
244
|
+
/* Use this to create a horizontal ruler across a column. */
|
245
|
+
hr {
|
246
|
+
background: #ddd;
|
247
|
+
color: #ddd;
|
248
|
+
clear: both;
|
249
|
+
float: none;
|
250
|
+
width: 100%;
|
251
|
+
height: 1px;
|
252
|
+
margin: 0 0 1.45em;
|
253
|
+
border: none;
|
254
|
+
}
|
255
|
+
|
256
|
+
hr.space {
|
257
|
+
background: #fff;
|
258
|
+
color: #fff;
|
259
|
+
visibility: hidden;
|
260
|
+
}
|
261
|
+
|
262
|
+
|
263
|
+
/* Clearing floats without extra markup
|
264
|
+
Based on How To Clear Floats Without Structural Markup by PiE
|
265
|
+
[http://www.positioniseverything.net/easyclearing.html] */
|
266
|
+
|
267
|
+
.clearfix:after, .container:after {
|
268
|
+
content: "\0020";
|
269
|
+
display: block;
|
270
|
+
height: 0;
|
271
|
+
clear: both;
|
272
|
+
visibility: hidden;
|
273
|
+
overflow:hidden;
|
274
|
+
}
|
275
|
+
.clearfix, .container {display: block;}
|
276
|
+
|
277
|
+
/* Regular clearing
|
278
|
+
apply to column that should drop below previous ones. */
|
279
|
+
|
280
|
+
.clear { clear:both; }
|