compass-jquery-plugin 0.3.0.beta.26 → 0.3.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -52
- data/VERSION.yml +1 -1
- data/compass-jquery-plugin.gemspec +6 -407
- data/gem_tasks/jrails.rake +84 -85
- data/gem_tasks/rubygems.rake +9 -1
- data/templates/jqtouch/config/initializers/jqtouch.rb +1 -1
- data/templates/jrails/config/initializers/jrails.rb +3 -3
- data/templates/jrails/{jquery-ui-1.8.6.js → jquery-ui.js} +0 -0
- data/templates/jrails/{jquery-ui-1.8.6.min.js → jquery-ui.min.js} +0 -0
- data/templates/jrails/{jquery-1.4.4.js → jquery.js} +360 -284
- data/templates/jrails/jquery.min.js +151 -0
- data/templates/jrails/manifest.rb +4 -4
- metadata +9 -410
- data/gem_tasks/jqgrid.rake +0 -119
- data/gem_tasks/mobile.rake +0 -144
- data/gem_tasks/secret_sauce.rake +0 -64
- data/lib/jquery/gridify/assertions.rb +0 -37
- data/lib/jquery/gridify/grid.rb +0 -147
- data/lib/jquery/gridify/grid_column.rb +0 -134
- data/lib/jquery/gridify/grid_finder.rb +0 -223
- data/lib/jquery/gridify/grid_options.rb +0 -279
- data/lib/jquery/gridify/grid_view.rb +0 -435
- data/lib/jquery/gridify.rb +0 -42
- data/lib/jquery/jqgrid/jqgrid.rb +0 -438
- data/lib/jquery/jqgrid.rb +0 -5
- data/lib/jquery/mobile.rb +0 -3
- data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +0 -14
- data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +0 -18
- data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +0 -6
- data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +0 -118
- data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +0 -226
- data/lib/jquery/secret_sauce/model/find_for_grid.rb +0 -42
- data/lib/jquery/secret_sauce.rb +0 -9
- data/templates/jqgrid/config/initializers/jqgrid.rb +0 -4
- data/templates/jqgrid/config/locales/jquery/jqgrid/de.yml +0 -7
- data/templates/jqgrid/config/locales/jquery/jqgrid/en.yml +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +0 -132
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +0 -132
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-cn.js +0 -132
- data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +0 -5
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +0 -133
- data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +0 -125
- data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +0 -130
- data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-gl.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-he.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-hu.js +0 -129
- data/templates/jqgrid/i18n/jqgrid/locale-hu.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +0 -1
- data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-ja.js +0 -155
- data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +0 -5
- data/templates/jqgrid/i18n/jqgrid/locale-nl.js +0 -149
- data/templates/jqgrid/i18n/jqgrid/locale-nl.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +0 -1
- data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +0 -125
- data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-ro.js +0 -139
- data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-sk.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-sk.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +0 -7
- data/templates/jqgrid/jquery/jqGrid.scss +0 -692
- data/templates/jqgrid/jquery.jqGrid.js +0 -11576
- data/templates/jqgrid/jquery.jqGrid.min.js +0 -472
- data/templates/jqgrid/manifest.rb +0 -70
- data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +0 -13
- data/templates/jrails/jquery-1.4.4.min.js +0 -152
- data/templates/mobile/config/initializers/mobile.rb +0 -6
- data/templates/mobile/glyphish/Read me first - license.txt +0 -14
- data/templates/mobile/glyphish/icons/01-refresh.png +0 -0
- data/templates/mobile/glyphish/icons/02-redo.png +0 -0
- data/templates/mobile/glyphish/icons/03-loopback.png +0 -0
- data/templates/mobile/glyphish/icons/04-squiggle.png +0 -0
- data/templates/mobile/glyphish/icons/05-shuffle.png +0 -0
- data/templates/mobile/glyphish/icons/06-magnifying-glass.png +0 -0
- data/templates/mobile/glyphish/icons/07-map-marker.png +0 -0
- data/templates/mobile/glyphish/icons/08-chat.png +0 -0
- data/templates/mobile/glyphish/icons/09-chat2.png +0 -0
- data/templates/mobile/glyphish/icons/10-medical.png +0 -0
- data/templates/mobile/glyphish/icons/100-coffee.png +0 -0
- data/templates/mobile/glyphish/icons/101-gameplan.png +0 -0
- data/templates/mobile/glyphish/icons/102-walk.png +0 -0
- data/templates/mobile/glyphish/icons/103-map.png +0 -0
- data/templates/mobile/glyphish/icons/104-index-cards.png +0 -0
- data/templates/mobile/glyphish/icons/105-piano.png +0 -0
- data/templates/mobile/glyphish/icons/106-sliders.png +0 -0
- data/templates/mobile/glyphish/icons/107-widescreen.png +0 -0
- data/templates/mobile/glyphish/icons/108-badge.png +0 -0
- data/templates/mobile/glyphish/icons/109-chicken.png +0 -0
- data/templates/mobile/glyphish/icons/11-clock.png +0 -0
- data/templates/mobile/glyphish/icons/110-bug.png +0 -0
- data/templates/mobile/glyphish/icons/111-user.png +0 -0
- data/templates/mobile/glyphish/icons/112-group.png +0 -0
- data/templates/mobile/glyphish/icons/113-navigation.png +0 -0
- data/templates/mobile/glyphish/icons/114-balloon.png +0 -0
- data/templates/mobile/glyphish/icons/115-bow-and-arrow.png +0 -0
- data/templates/mobile/glyphish/icons/116-controller.png +0 -0
- data/templates/mobile/glyphish/icons/117-todo.png +0 -0
- data/templates/mobile/glyphish/icons/118-coathanger.png +0 -0
- data/templates/mobile/glyphish/icons/119-piggybank.png +0 -0
- data/templates/mobile/glyphish/icons/12-eye.png +0 -0
- data/templates/mobile/glyphish/icons/120-headphones.png +0 -0
- data/templates/mobile/glyphish/icons/121-lanscape.png +0 -0
- data/templates/mobile/glyphish/icons/122-stats.png +0 -0
- data/templates/mobile/glyphish/icons/123-id-card.png +0 -0
- data/templates/mobile/glyphish/icons/124-bullhorn.png +0 -0
- data/templates/mobile/glyphish/icons/125-food.png +0 -0
- data/templates/mobile/glyphish/icons/126-moon.png +0 -0
- data/templates/mobile/glyphish/icons/127-sock.png +0 -0
- data/templates/mobile/glyphish/icons/128-bone.png +0 -0
- data/templates/mobile/glyphish/icons/129-golf.png +0 -0
- data/templates/mobile/glyphish/icons/13-target.png +0 -0
- data/templates/mobile/glyphish/icons/130-dice.png +0 -0
- data/templates/mobile/glyphish/icons/14-tag.png +0 -0
- data/templates/mobile/glyphish/icons/15-tags.png +0 -0
- data/templates/mobile/glyphish/icons/16-line-chart.png +0 -0
- data/templates/mobile/glyphish/icons/17-bar-chart.png +0 -0
- data/templates/mobile/glyphish/icons/18-envelope.png +0 -0
- data/templates/mobile/glyphish/icons/19-gear.png +0 -0
- data/templates/mobile/glyphish/icons/20-gear2.png +0 -0
- data/templates/mobile/glyphish/icons/21-skull.png +0 -0
- data/templates/mobile/glyphish/icons/22-skull-n-crossbones.png +0 -0
- data/templates/mobile/glyphish/icons/23-bird.png +0 -0
- data/templates/mobile/glyphish/icons/24-gift.png +0 -0
- data/templates/mobile/glyphish/icons/25-weather.png +0 -0
- data/templates/mobile/glyphish/icons/26-bandaid.png +0 -0
- data/templates/mobile/glyphish/icons/27-planet.png +0 -0
- data/templates/mobile/glyphish/icons/28-star.png +0 -0
- data/templates/mobile/glyphish/icons/29-heart.png +0 -0
- data/templates/mobile/glyphish/icons/30-key.png +0 -0
- data/templates/mobile/glyphish/icons/31-ipod.png +0 -0
- data/templates/mobile/glyphish/icons/32-iphone.png +0 -0
- data/templates/mobile/glyphish/icons/33-cabinet.png +0 -0
- data/templates/mobile/glyphish/icons/34-coffee.png +0 -0
- data/templates/mobile/glyphish/icons/35-shopping-bag.png +0 -0
- data/templates/mobile/glyphish/icons/36-toolbox.png +0 -0
- data/templates/mobile/glyphish/icons/37-suitcase.png +0 -0
- data/templates/mobile/glyphish/icons/38-airplane.png +0 -0
- data/templates/mobile/glyphish/icons/39-spraycan.png +0 -0
- data/templates/mobile/glyphish/icons/40-inbox.png +0 -0
- data/templates/mobile/glyphish/icons/41-picture-frame.png +0 -0
- data/templates/mobile/glyphish/icons/42-photos.png +0 -0
- data/templates/mobile/glyphish/icons/43-film-roll.png +0 -0
- data/templates/mobile/glyphish/icons/44-shoebox.png +0 -0
- data/templates/mobile/glyphish/icons/45-movie1.png +0 -0
- data/templates/mobile/glyphish/icons/46-movie2.png +0 -0
- data/templates/mobile/glyphish/icons/47-fuel.png +0 -0
- data/templates/mobile/glyphish/icons/48-fork-and-knife.png +0 -0
- data/templates/mobile/glyphish/icons/49-battery.png +0 -0
- data/templates/mobile/glyphish/icons/50-beaker.png +0 -0
- data/templates/mobile/glyphish/icons/51-outlet.png +0 -0
- data/templates/mobile/glyphish/icons/52-pinetree.png +0 -0
- data/templates/mobile/glyphish/icons/53-house.png +0 -0
- data/templates/mobile/glyphish/icons/54-lock.png +0 -0
- data/templates/mobile/glyphish/icons/55-network.png +0 -0
- data/templates/mobile/glyphish/icons/56-cloud.png +0 -0
- data/templates/mobile/glyphish/icons/57-download.png +0 -0
- data/templates/mobile/glyphish/icons/58-bookmark.png +0 -0
- data/templates/mobile/glyphish/icons/59-flag.png +0 -0
- data/templates/mobile/glyphish/icons/60-signpost.png +0 -0
- data/templates/mobile/glyphish/icons/61-brightness.png +0 -0
- data/templates/mobile/glyphish/icons/62-contrast.png +0 -0
- data/templates/mobile/glyphish/icons/63-runner.png +0 -0
- data/templates/mobile/glyphish/icons/64-zap.png +0 -0
- data/templates/mobile/glyphish/icons/65-note.png +0 -0
- data/templates/mobile/glyphish/icons/66-microphone.png +0 -0
- data/templates/mobile/glyphish/icons/67-tshirt.png +0 -0
- data/templates/mobile/glyphish/icons/68-paperclip.png +0 -0
- data/templates/mobile/glyphish/icons/69-display.png +0 -0
- data/templates/mobile/glyphish/icons/70-tv.png +0 -0
- data/templates/mobile/glyphish/icons/71-compass.png +0 -0
- data/templates/mobile/glyphish/icons/72-pin.png +0 -0
- data/templates/mobile/glyphish/icons/73-radar.png +0 -0
- data/templates/mobile/glyphish/icons/74-location.png +0 -0
- data/templates/mobile/glyphish/icons/75-phone.png +0 -0
- data/templates/mobile/glyphish/icons/76-baby.png +0 -0
- data/templates/mobile/glyphish/icons/77-ekg.png +0 -0
- data/templates/mobile/glyphish/icons/78-stopwatch.png +0 -0
- data/templates/mobile/glyphish/icons/79-medical-bag.png +0 -0
- data/templates/mobile/glyphish/icons/80-shopping-cart.png +0 -0
- data/templates/mobile/glyphish/icons/81-dashboard.png +0 -0
- data/templates/mobile/glyphish/icons/82-dogpaw.png +0 -0
- data/templates/mobile/glyphish/icons/83-calendar.png +0 -0
- data/templates/mobile/glyphish/icons/84-lightbulb.png +0 -0
- data/templates/mobile/glyphish/icons/85-trophy.png +0 -0
- data/templates/mobile/glyphish/icons/86-camera.png +0 -0
- data/templates/mobile/glyphish/icons/87-wineglass.png +0 -0
- data/templates/mobile/glyphish/icons/88-beermug.png +0 -0
- data/templates/mobile/glyphish/icons/89-dumbbell.png +0 -0
- data/templates/mobile/glyphish/icons/90-lifebuoy.png +0 -0
- data/templates/mobile/glyphish/icons/91-beaker2.png +0 -0
- data/templates/mobile/glyphish/icons/92-testtube.png +0 -0
- data/templates/mobile/glyphish/icons/93-thermometer.png +0 -0
- data/templates/mobile/glyphish/icons/94-pill.png +0 -0
- data/templates/mobile/glyphish/icons/95-equalizer.png +0 -0
- data/templates/mobile/glyphish/icons/96-book.png +0 -0
- data/templates/mobile/glyphish/icons/97-puzzle.png +0 -0
- data/templates/mobile/glyphish/icons/98-palette.png +0 -0
- data/templates/mobile/glyphish/icons/99-umbrella.png +0 -0
- data/templates/mobile/glyphish/mini-icons/01-refresh.png +0 -0
- data/templates/mobile/glyphish/mini-icons/02-redo.png +0 -0
- data/templates/mobile/glyphish/mini-icons/03-loopback.png +0 -0
- data/templates/mobile/glyphish/mini-icons/04-squiggle.png +0 -0
- data/templates/mobile/glyphish/mini-icons/05-shuffle.png +0 -0
- data/templates/mobile/glyphish/mini-icons/06-magnifying-glass.png +0 -0
- data/templates/mobile/glyphish/mini-icons/07-map-marker.png +0 -0
- data/templates/mobile/glyphish/mini-icons/08-chat.png +0 -0
- data/templates/mobile/glyphish/mini-icons/09-chat2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/10-medical.png +0 -0
- data/templates/mobile/glyphish/mini-icons/100-coffee.png +0 -0
- data/templates/mobile/glyphish/mini-icons/101-gameplan.png +0 -0
- data/templates/mobile/glyphish/mini-icons/102-walk.png +0 -0
- data/templates/mobile/glyphish/mini-icons/103-map.png +0 -0
- data/templates/mobile/glyphish/mini-icons/104-index-cards.png +0 -0
- data/templates/mobile/glyphish/mini-icons/105-piano.png +0 -0
- data/templates/mobile/glyphish/mini-icons/106-sliders.png +0 -0
- data/templates/mobile/glyphish/mini-icons/107-widescreen.png +0 -0
- data/templates/mobile/glyphish/mini-icons/108-badge.png +0 -0
- data/templates/mobile/glyphish/mini-icons/109-chicken.png +0 -0
- data/templates/mobile/glyphish/mini-icons/11-clock.png +0 -0
- data/templates/mobile/glyphish/mini-icons/110-bug.png +0 -0
- data/templates/mobile/glyphish/mini-icons/111-user.png +0 -0
- data/templates/mobile/glyphish/mini-icons/112-group.png +0 -0
- data/templates/mobile/glyphish/mini-icons/113-navigation.png +0 -0
- data/templates/mobile/glyphish/mini-icons/114-balloon.png +0 -0
- data/templates/mobile/glyphish/mini-icons/115-bow-and-arrow.png +0 -0
- data/templates/mobile/glyphish/mini-icons/116-controller.png +0 -0
- data/templates/mobile/glyphish/mini-icons/117-todo.png +0 -0
- data/templates/mobile/glyphish/mini-icons/118-coathanger.png +0 -0
- data/templates/mobile/glyphish/mini-icons/119-piggybank.png +0 -0
- data/templates/mobile/glyphish/mini-icons/12-eye.png +0 -0
- data/templates/mobile/glyphish/mini-icons/120-headphones.png +0 -0
- data/templates/mobile/glyphish/mini-icons/121-lanscape.png +0 -0
- data/templates/mobile/glyphish/mini-icons/122-stats.png +0 -0
- data/templates/mobile/glyphish/mini-icons/123-id-card.png +0 -0
- data/templates/mobile/glyphish/mini-icons/124-bullhorn.png +0 -0
- data/templates/mobile/glyphish/mini-icons/125-food.png +0 -0
- data/templates/mobile/glyphish/mini-icons/126-moon.png +0 -0
- data/templates/mobile/glyphish/mini-icons/127-sock.png +0 -0
- data/templates/mobile/glyphish/mini-icons/128-bone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/129-golf.png +0 -0
- data/templates/mobile/glyphish/mini-icons/13-target.png +0 -0
- data/templates/mobile/glyphish/mini-icons/130-dice.png +0 -0
- data/templates/mobile/glyphish/mini-icons/14-tag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/15-tags.png +0 -0
- data/templates/mobile/glyphish/mini-icons/16-line-chart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/17-bar-chart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/18-envelope.png +0 -0
- data/templates/mobile/glyphish/mini-icons/19-gear.png +0 -0
- data/templates/mobile/glyphish/mini-icons/20-gear2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/21-skull.png +0 -0
- data/templates/mobile/glyphish/mini-icons/22-skull-n-crossbones.png +0 -0
- data/templates/mobile/glyphish/mini-icons/23-bird.png +0 -0
- data/templates/mobile/glyphish/mini-icons/24-gift.png +0 -0
- data/templates/mobile/glyphish/mini-icons/25-weather.png +0 -0
- data/templates/mobile/glyphish/mini-icons/26-bandaid.png +0 -0
- data/templates/mobile/glyphish/mini-icons/27-planet.png +0 -0
- data/templates/mobile/glyphish/mini-icons/28-star.png +0 -0
- data/templates/mobile/glyphish/mini-icons/29-heart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/30-key.png +0 -0
- data/templates/mobile/glyphish/mini-icons/31-ipod.png +0 -0
- data/templates/mobile/glyphish/mini-icons/32-iphone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/33-cabinet.png +0 -0
- data/templates/mobile/glyphish/mini-icons/34-coffee.png +0 -0
- data/templates/mobile/glyphish/mini-icons/35-shopping-bag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/36-toolbox.png +0 -0
- data/templates/mobile/glyphish/mini-icons/37-suitcase.png +0 -0
- data/templates/mobile/glyphish/mini-icons/38-airplane.png +0 -0
- data/templates/mobile/glyphish/mini-icons/39-spraycan.png +0 -0
- data/templates/mobile/glyphish/mini-icons/40-inbox.png +0 -0
- data/templates/mobile/glyphish/mini-icons/41-picture-frame.png +0 -0
- data/templates/mobile/glyphish/mini-icons/42-photos.png +0 -0
- data/templates/mobile/glyphish/mini-icons/43-film-roll.png +0 -0
- data/templates/mobile/glyphish/mini-icons/44-shoebox.png +0 -0
- data/templates/mobile/glyphish/mini-icons/45-movie1.png +0 -0
- data/templates/mobile/glyphish/mini-icons/46-movie2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/47-fuel.png +0 -0
- data/templates/mobile/glyphish/mini-icons/48-fork-and-knife.png +0 -0
- data/templates/mobile/glyphish/mini-icons/49-battery.png +0 -0
- data/templates/mobile/glyphish/mini-icons/50-beaker.png +0 -0
- data/templates/mobile/glyphish/mini-icons/51-outlet.png +0 -0
- data/templates/mobile/glyphish/mini-icons/52-pinetree.png +0 -0
- data/templates/mobile/glyphish/mini-icons/53-house.png +0 -0
- data/templates/mobile/glyphish/mini-icons/54-lock.png +0 -0
- data/templates/mobile/glyphish/mini-icons/55-network.png +0 -0
- data/templates/mobile/glyphish/mini-icons/56-cloud.png +0 -0
- data/templates/mobile/glyphish/mini-icons/57-download.png +0 -0
- data/templates/mobile/glyphish/mini-icons/58-bookmark.png +0 -0
- data/templates/mobile/glyphish/mini-icons/59-flag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/60-signpost.png +0 -0
- data/templates/mobile/glyphish/mini-icons/61-brightness.png +0 -0
- data/templates/mobile/glyphish/mini-icons/62-contrast.png +0 -0
- data/templates/mobile/glyphish/mini-icons/63-runner.png +0 -0
- data/templates/mobile/glyphish/mini-icons/64-zap.png +0 -0
- data/templates/mobile/glyphish/mini-icons/65-note.png +0 -0
- data/templates/mobile/glyphish/mini-icons/66-microphone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/67-tshirt.png +0 -0
- data/templates/mobile/glyphish/mini-icons/68-paperclip.png +0 -0
- data/templates/mobile/glyphish/mini-icons/69-display.png +0 -0
- data/templates/mobile/glyphish/mini-icons/70-tv.png +0 -0
- data/templates/mobile/glyphish/mini-icons/71-compass.png +0 -0
- data/templates/mobile/glyphish/mini-icons/72-pin.png +0 -0
- data/templates/mobile/glyphish/mini-icons/73-radar.png +0 -0
- data/templates/mobile/glyphish/mini-icons/74-location.png +0 -0
- data/templates/mobile/glyphish/mini-icons/75-phone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/76-baby.png +0 -0
- data/templates/mobile/glyphish/mini-icons/77-ekg.png +0 -0
- data/templates/mobile/glyphish/mini-icons/78-stopwatch.png +0 -0
- data/templates/mobile/glyphish/mini-icons/79-medical-bag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/80-shopping-cart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/81-dashboard.png +0 -0
- data/templates/mobile/glyphish/mini-icons/82-dogpaw.png +0 -0
- data/templates/mobile/glyphish/mini-icons/83-calendar.png +0 -0
- data/templates/mobile/glyphish/mini-icons/84-lightbulb.png +0 -0
- data/templates/mobile/glyphish/mini-icons/85-trophy.png +0 -0
- data/templates/mobile/glyphish/mini-icons/86-camera.png +0 -0
- data/templates/mobile/glyphish/mini-icons/87-wineglass.png +0 -0
- data/templates/mobile/glyphish/mini-icons/88-beermug.png +0 -0
- data/templates/mobile/glyphish/mini-icons/89-dumbbell.png +0 -0
- data/templates/mobile/glyphish/mini-icons/90-lifebuoy.png +0 -0
- data/templates/mobile/glyphish/mini-icons/91-beaker2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/92-testtube.png +0 -0
- data/templates/mobile/glyphish/mini-icons/93-thermometer.png +0 -0
- data/templates/mobile/glyphish/mini-icons/94-pill.png +0 -0
- data/templates/mobile/glyphish/mini-icons/95-equalizer.png +0 -0
- data/templates/mobile/glyphish/mini-icons/96-book.png +0 -0
- data/templates/mobile/glyphish/mini-icons/97-puzzle.png +0 -0
- data/templates/mobile/glyphish/mini-icons/98-palette.png +0 -0
- data/templates/mobile/glyphish/mini-icons/99-umbrella.png +0 -0
- data/templates/mobile/jquery/mobile/_base.scss +0 -1325
- data/templates/mobile/jquery/mobile/default/ajax-loader.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-down.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-left.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-right.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-up.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-delete.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-minus-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-plus-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-search-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/default.scss +0 -742
- data/templates/mobile/jquery/mobile/valencia/ajax-loader.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-down.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-left.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-right.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-up.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-delete.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-minus-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-plus-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-search-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/texture_05.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/texture_075.png +0 -0
- data/templates/mobile/jquery/mobile/valencia.scss +0 -804
- data/templates/mobile/jquery.mobile.js +0 -3390
- data/templates/mobile/jquery.mobile.min.js +0 -28
- data/templates/mobile/lib/tasks/jquery.mobile.rake +0 -106
- data/templates/mobile/manifest.rb +0 -307
- data/templates/secret_sauce/app/views/shared/_ui_form_error_messages.html.haml +0 -6
- data/templates/secret_sauce/app/views/shared/_ui_grid_for_without_block.js.haml +0 -144
- data/templates/secret_sauce/app/views/shared/_ui_static_dialog.html.haml +0 -6
- data/templates/secret_sauce/config/initializers/secret_sauce.rb +0 -8
- data/templates/secret_sauce/jquery/secret_sauce.scss +0 -33
- data/templates/secret_sauce/manifest.rb +0 -10
- data/templates/secret_sauce/secret_sauce.js +0 -12
- data/templates/secret_sauce/secret_sauce.min.js +0 -1
data/gem_tasks/mobile.rake
DELETED
@@ -1,144 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
require 'lib/handle_js_files'
|
3
|
-
require 'lib/jquery_mobile_theme'
|
4
|
-
|
5
|
-
MOBILE_SRC = File.join(GEM_ROOT, 'src', 'mobile')
|
6
|
-
MOBILE_SRC_IMAGES = File.join(MOBILE_SRC, 'images')
|
7
|
-
MOBILE_SRC_THEMES = File.join(MOBILE_SRC, 'themes')
|
8
|
-
|
9
|
-
MOBILE_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'mobile')
|
10
|
-
MOBILE_DEST_THEMES = File.join(MOBILE_DEST_TEMPLATES, 'jquery', 'mobile')
|
11
|
-
MOBILE_DEST_IMAGES = File.join(MOBILE_DEST_THEMES)
|
12
|
-
|
13
|
-
all_scripts = [
|
14
|
-
'js/jquery.ui.widget.js',
|
15
|
-
'js/jquery.mobile.widget.js',
|
16
|
-
'js/jquery.mobile.support.js',
|
17
|
-
'js/jquery.mobile.event.js',
|
18
|
-
'js/jquery.mobile.hashchange.js',
|
19
|
-
'js/jquery.mobile.page.js',
|
20
|
-
'js/jquery.mobile.fixHeaderFooter.js',
|
21
|
-
'js/jquery.mobile.forms.checkboxradio.js',
|
22
|
-
'js/jquery.mobile.forms.textinput.js',
|
23
|
-
'js/jquery.mobile.forms.select.js',
|
24
|
-
'js/jquery.mobile.buttonMarkup.js',
|
25
|
-
'js/jquery.mobile.forms.button.js',
|
26
|
-
'js/jquery.mobile.forms.slider.js',
|
27
|
-
'js/jquery.mobile.collapsible.js',
|
28
|
-
'js/jquery.mobile.controlGroup.js',
|
29
|
-
'js/jquery.mobile.fieldContain.js',
|
30
|
-
'js/jquery.mobile.listview.js',
|
31
|
-
'js/jquery.mobile.listview.filter.js',
|
32
|
-
'js/jquery.mobile.dialog.js',
|
33
|
-
'js/jquery.mobile.navbar.js',
|
34
|
-
'js/jquery.mobile.grid.js',
|
35
|
-
'js/jquery.mobile.js',
|
36
|
-
'js/jquery.mobile.themeswitcher.js'
|
37
|
-
].collect {|filename| File.read(File.join(MOBILE_SRC, filename))}.join "\n\n"
|
38
|
-
|
39
|
-
namespace :build do
|
40
|
-
desc 'Build the stylesheets and templates for jquery.mobile.'
|
41
|
-
task :mobile do
|
42
|
-
|
43
|
-
FileUtils.remove_dir MOBILE_DEST_TEMPLATES if File.exists? MOBILE_DEST_TEMPLATES
|
44
|
-
FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'config', 'initializers'))
|
45
|
-
FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'lib', 'tasks'))
|
46
|
-
|
47
|
-
open File.join(MOBILE_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
|
48
|
-
manifest.print MOBILE_MESSAGE1
|
49
|
-
|
50
|
-
open File.join(MOBILE_DEST_TEMPLATES, 'config', 'initializers', 'mobile.rb'), 'w' do |f|
|
51
|
-
f.print(File.read(File.join(MOBILE_SRC, 'config', 'initializers', 'mobile.rb')))
|
52
|
-
end
|
53
|
-
manifest.print "file 'config/initializers/mobile.rb'\n"
|
54
|
-
|
55
|
-
open File.join(MOBILE_DEST_TEMPLATES, 'lib', 'tasks', 'jquery.mobile.rake'), 'w' do |f|
|
56
|
-
f.print(File.read(File.join(MOBILE_SRC, 'lib', 'tasks', 'jquery.mobile.rake')))
|
57
|
-
end
|
58
|
-
manifest.print "file 'lib/tasks/jquery.mobile.rake'\n"
|
59
|
-
|
60
|
-
#JavaScripts
|
61
|
-
|
62
|
-
open File.join(MOBILE_DEST_TEMPLATES, 'jquery.mobile.js'), 'w' do |f|
|
63
|
-
f.print concat_files(all_scripts)
|
64
|
-
end
|
65
|
-
manifest.print "javascript 'jquery.mobile.js'\n"
|
66
|
-
|
67
|
-
open File.join(MOBILE_DEST_TEMPLATES, 'jquery.mobile.min.js'), 'w' do |f|
|
68
|
-
f.print compress_js(all_scripts, "yui")
|
69
|
-
end
|
70
|
-
manifest.print "javascript 'jquery.mobile.min.js'\n"
|
71
|
-
|
72
|
-
# jQuery Mobile Themes
|
73
|
-
mobile = JqueryMobileTheme.new(File.join(MOBILE_SRC_THEMES, 'default'))
|
74
|
-
|
75
|
-
base_stylesheets = [
|
76
|
-
'jquery.mobile.core.css',
|
77
|
-
'jquery.mobile.button.css',
|
78
|
-
'jquery.mobile.collapsible.css',
|
79
|
-
'jquery.mobile.controlgroup.css',
|
80
|
-
'jquery.mobile.dialog.css',
|
81
|
-
'jquery.mobile.forms.checkboxradio.css',
|
82
|
-
'jquery.mobile.forms.fieldcontain.css',
|
83
|
-
'jquery.mobile.forms.select.css',
|
84
|
-
'jquery.mobile.forms.slider.css',
|
85
|
-
'jquery.mobile.forms.textinput.css',
|
86
|
-
'jquery.mobile.grids.css',
|
87
|
-
'jquery.mobile.headerfooter.css',
|
88
|
-
'jquery.mobile.listview.css',
|
89
|
-
'jquery.mobile.navbar.css',
|
90
|
-
'jquery.mobile.transitions.css'
|
91
|
-
].collect {|filename| File.read(File.join(MOBILE_SRC_THEMES, 'default', filename))}.join "\n\n"
|
92
|
-
|
93
|
-
FileUtils.mkdir_p(MOBILE_DEST_THEMES)
|
94
|
-
open File.join(MOBILE_DEST_THEMES, '_base.scss'), 'w' do |f|
|
95
|
-
sass = MOBILE_MESSAGE2
|
96
|
-
IO.popen("sass-convert -F css -T scss", 'r+') { |ff| ff.print(base_stylesheets); ff.close_write; sass += ff.read }
|
97
|
-
f.print sass
|
98
|
-
end
|
99
|
-
manifest.print "stylesheet 'jquery/mobile/_base.scss'\n"
|
100
|
-
|
101
|
-
Dir.foreach MOBILE_SRC_THEMES do |theme|
|
102
|
-
next if /^\./ =~ theme
|
103
|
-
mobile.convert_theme(theme, File.join(MOBILE_SRC_THEMES, theme), File.join(MOBILE_DEST_THEMES))
|
104
|
-
manifest.print "stylesheet 'jquery/mobile/#{theme}.scss'\n"
|
105
|
-
|
106
|
-
# Copy the theme images directory
|
107
|
-
src_dir = File.join(MOBILE_SRC_THEMES, theme, 'images')
|
108
|
-
dest_dir = File.join(MOBILE_DEST_IMAGES, theme)
|
109
|
-
FileUtils.mkdir_p dest_dir
|
110
|
-
|
111
|
-
Dir.foreach(src_dir) do |image|
|
112
|
-
next if /^\./ =~ image
|
113
|
-
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
114
|
-
manifest.print "image 'jquery/mobile/#{theme}/#{image}'\n"
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
# glyphish Images
|
119
|
-
FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'icons'))
|
120
|
-
|
121
|
-
src_dir = File.join(MOBILE_SRC_IMAGES, 'glyphish', 'icons')
|
122
|
-
dest_dir = File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'icons')
|
123
|
-
Dir.foreach(src_dir) do |image|
|
124
|
-
next if /^\./ =~ image
|
125
|
-
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
126
|
-
manifest.print "image 'glyphish/icons/#{image}'\n"
|
127
|
-
end
|
128
|
-
FileUtils.mkdir_p(File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'mini-icons'))
|
129
|
-
src_dir = File.join(MOBILE_SRC_IMAGES, 'glyphish', 'icons')
|
130
|
-
dest_dir = File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'mini-icons')
|
131
|
-
Dir.foreach(src_dir) do |image|
|
132
|
-
next if /^\./ =~ image
|
133
|
-
FileUtils.cp(File.join(src_dir, image), dest_dir)
|
134
|
-
manifest.print "image 'glyphish/mini-icons/#{image}'\n"
|
135
|
-
end
|
136
|
-
|
137
|
-
open File.join(MOBILE_DEST_TEMPLATES, 'glyphish', 'Read me first - license.txt'), 'w' do |f|
|
138
|
-
f.print(File.read(File.join(MOBILE_SRC_IMAGES, 'glyphish', 'Read me first - license.txt')))
|
139
|
-
end
|
140
|
-
manifest.print "image 'glyphish/Read me first - license.txt'\n"
|
141
|
-
|
142
|
-
end
|
143
|
-
end
|
144
|
-
end
|
data/gem_tasks/secret_sauce.rake
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
require 'lib/handle_js_files'
|
3
|
-
|
4
|
-
# Compass generator for jqGrid 3.5+
|
5
|
-
SECRET_SAUCE_SRC = File.join(GEM_ROOT, 'src', 'secret_sauce')
|
6
|
-
SECRET_SAUCE_SRC_SCRIPTS = SECRET_SAUCE_SRC + "/*.js"
|
7
|
-
|
8
|
-
SECRET_SAUCE_DEST_TEMPLATES = File.join(GEM_ROOT, 'templates', 'secret_sauce')
|
9
|
-
SECRET_SAUCE_DEST_STYLESHEETS = File.join(SECRET_SAUCE_DEST_TEMPLATES, 'jquery')
|
10
|
-
SECRET_SAUCE_DEST_CONFIG = File.join(SECRET_SAUCE_DEST_TEMPLATES, 'config', 'initializers')
|
11
|
-
SECRET_SAUCE_DEST_VIEWS = File.join(SECRET_SAUCE_DEST_TEMPLATES, 'app', 'views', 'shared')
|
12
|
-
|
13
|
-
SECRET_SAUCE_MESSAGE1 = "# Generated by compass-jquery-plugin/gem-tasks/secret_sauce.rake\n# Install with: compass install jquery/secret_sauce\n\n"
|
14
|
-
SECRET_SAUCE_MESSAGE2 = "// Generated by compass-jquery-pluginy/gem-tasks/secret_sauce.rake\n\n"
|
15
|
-
|
16
|
-
namespace :build do
|
17
|
-
desc 'Build the stylesheets and templates for jqGrid.'
|
18
|
-
task :secret_sauce do
|
19
|
-
|
20
|
-
FileUtils.remove_dir(SECRET_SAUCE_DEST_TEMPLATES) if File.exists? SECRET_SAUCE_DEST_TEMPLATES
|
21
|
-
FileUtils.mkdir_p(SECRET_SAUCE_DEST_CONFIG)
|
22
|
-
FileUtils.mkdir_p(SECRET_SAUCE_DEST_VIEWS)
|
23
|
-
|
24
|
-
open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'manifest.rb'), 'w' do |manifest|
|
25
|
-
manifest.print SECRET_SAUCE_MESSAGE1
|
26
|
-
|
27
|
-
Dir.foreach File.join(SECRET_SAUCE_SRC, 'app', 'views', 'shared') do |file|
|
28
|
-
next unless /\.haml$/ =~ file
|
29
|
-
html = File.read File.join(SECRET_SAUCE_SRC, 'app', 'views', 'shared', file)
|
30
|
-
open File.join(SECRET_SAUCE_DEST_VIEWS, file), 'w' do |f|
|
31
|
-
f.print(html)
|
32
|
-
end
|
33
|
-
manifest.print "file 'app/views/shared/#{file}'\n"
|
34
|
-
end
|
35
|
-
|
36
|
-
open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'config', 'initializers', 'secret_sauce.rb'), 'w' do |f|
|
37
|
-
f.print(File.read(File.join(SECRET_SAUCE_SRC, 'config', 'initializers', 'secret_sauce.rb')))
|
38
|
-
end
|
39
|
-
manifest.print "file 'config/initializers/secret_sauce.rb'\n"
|
40
|
-
|
41
|
-
open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'secret_sauce.js'), 'w' do |f|
|
42
|
-
f.print concat_files(all_files(SECRET_SAUCE_SRC_SCRIPTS))
|
43
|
-
end
|
44
|
-
manifest.print "javascript 'secret_sauce.js'\n"
|
45
|
-
|
46
|
-
open File.join(SECRET_SAUCE_DEST_TEMPLATES, 'secret_sauce.min.js'), 'w' do |f|
|
47
|
-
f.print compress_js(all_files(SECRET_SAUCE_SRC_SCRIPTS), "google")
|
48
|
-
end
|
49
|
-
manifest.print "javascript 'secret_sauce.min.js'\n"
|
50
|
-
|
51
|
-
FileUtils.mkdir_p(SECRET_SAUCE_DEST_STYLESHEETS)
|
52
|
-
Dir.foreach File.join(SECRET_SAUCE_SRC, 'css') do |file|
|
53
|
-
next unless /\.css$/ =~ file
|
54
|
-
css = File.read File.join(SECRET_SAUCE_SRC, 'css', file)
|
55
|
-
sass = ''
|
56
|
-
IO.popen("sass-convert -F css -T scss", 'r+') { |f| f.print(css); f.close_write; sass = f.read }
|
57
|
-
open(File.join(SECRET_SAUCE_DEST_STYLESHEETS, file.gsub(/\.css$/,'.scss')), 'w') do |f|
|
58
|
-
f.write SECRET_SAUCE_MESSAGE2 + sass
|
59
|
-
end
|
60
|
-
manifest.print "stylesheet 'jquery/#{file.gsub(/\.css$/,'.scss')}'\n"
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# lifted from state_machine plugin
|
2
|
-
module Gridify
|
3
|
-
# Provides a set of helper methods for making assertions about the content
|
4
|
-
# of various objects
|
5
|
-
module Assertions
|
6
|
-
# Validates that the given hash *only* includes the specified valid keys.
|
7
|
-
# If any invalid keys are found, an ArgumentError will be raised.
|
8
|
-
#
|
9
|
-
# == Examples
|
10
|
-
#
|
11
|
-
# options = {:name => 'John Smith', :age => 30}
|
12
|
-
#
|
13
|
-
# assert_valid_keys(options, :name) # => ArgumentError: Invalid key(s): age
|
14
|
-
# assert_valid_keys(options, 'name', 'age') # => ArgumentError: Invalid key(s): age, name
|
15
|
-
# assert_valid_keys(options, :name, :age) # => nil
|
16
|
-
def assert_valid_keys(hash, *valid_keys)
|
17
|
-
invalid_keys = hash.keys - valid_keys
|
18
|
-
raise ArgumentError, "Invalid key(s): #{invalid_keys.join(', ')}" unless invalid_keys.empty?
|
19
|
-
end
|
20
|
-
|
21
|
-
# Validates that the given hash only includes at *most* one of a set of
|
22
|
-
# exclusive keys. If more than one key is found, an ArgumentError will be
|
23
|
-
# raised.
|
24
|
-
#
|
25
|
-
# == Examples
|
26
|
-
#
|
27
|
-
# options = {:only => :on, :except => :off}
|
28
|
-
# assert_exclusive_keys(options, :only) # => nil
|
29
|
-
# assert_exclusive_keys(options, :except) # => nil
|
30
|
-
# assert_exclusive_keys(options, :only, :except) # => ArgumentError: Conflicting keys: only, except
|
31
|
-
# assert_exclusive_keys(options, :only, :except, :with) # => ArgumentError: Conflicting keys: only, except
|
32
|
-
def assert_exclusive_keys(hash, *exclusive_keys)
|
33
|
-
conflicting_keys = exclusive_keys & hash.keys
|
34
|
-
raise ArgumentError, "Conflicting keys: #{conflicting_keys.join(', ')}" unless conflicting_keys.length <= 1
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
data/lib/jquery/gridify/grid.rb
DELETED
@@ -1,147 +0,0 @@
|
|
1
|
-
require 'jquery/gridify/assertions'
|
2
|
-
require 'jquery/gridify/grid_options'
|
3
|
-
require 'jquery/gridify/grid_view'
|
4
|
-
require 'jquery/gridify/grid_column'
|
5
|
-
require 'jquery/gridify/grid_finder'
|
6
|
-
|
7
|
-
# NOTE: for readablity/clarity, native jqGrid options should be string; Ruby ones as syms
|
8
|
-
|
9
|
-
module Gridify
|
10
|
-
class Grid
|
11
|
-
include Assertions
|
12
|
-
|
13
|
-
# todo: change this so klass is optional, decouple from active record
|
14
|
-
def initialize( klass, *args, &block )
|
15
|
-
#debugger
|
16
|
-
options = args.extract_options! # => args.last.is_a?(Hash) ? args.pop : {}
|
17
|
-
assert_exclusive_keys( options, :only, :except)
|
18
|
-
|
19
|
-
@resource = klass.to_s.tableize.pluralize
|
20
|
-
@name = args.first || :grid
|
21
|
-
|
22
|
-
# non-persistent options
|
23
|
-
# generate model unless explicitly say no
|
24
|
-
build_model = options.delete(:build_model) == false ? false : true
|
25
|
-
only = options.delete(:only)
|
26
|
-
except = options.delete(:except)
|
27
|
-
col_presets = options.delete(:colModel)
|
28
|
-
col_include = options[:colInclude]
|
29
|
-
|
30
|
-
# assign options
|
31
|
-
update options
|
32
|
-
|
33
|
-
# build columns from ActiveRecord model (klass)
|
34
|
-
if klass.present? && build_model
|
35
|
-
@model = build_columns(klass, only, except, col_presets, col_include)
|
36
|
-
end
|
37
|
-
|
38
|
-
instance_eval(&block) if block
|
39
|
-
#(note instance_eval cannot access things outside its scope; otherwise do this:
|
40
|
-
#yield self if block_given?
|
41
|
-
end
|
42
|
-
|
43
|
-
def update( options )
|
44
|
-
options.each {|atr, val| send( "#{atr}=", val )}
|
45
|
-
# exception "invalid option..."
|
46
|
-
end
|
47
|
-
|
48
|
-
def column( name, options={} )
|
49
|
-
name = name.to_s
|
50
|
-
klass = resource.classify.constantize
|
51
|
-
# TODO: set edit options based on ar_column
|
52
|
-
# TODO: edit
|
53
|
-
# TODO: handle file input types
|
54
|
-
# TODO: custom input types
|
55
|
-
if col = columns_hash[name]
|
56
|
-
# update an existing column
|
57
|
-
col.update options
|
58
|
-
|
59
|
-
elsif ar = klass.columns.detect {|c| c.name==name}
|
60
|
-
#debugger
|
61
|
-
# create column from database schema
|
62
|
-
edit = editable &&
|
63
|
-
# only edit accessible attributes
|
64
|
-
(klass.accessible_attributes.nil? || klass.accessible_attributes.include?(ar.name))
|
65
|
-
args = {
|
66
|
-
:ar_column => ar,
|
67
|
-
:name => ar.name,
|
68
|
-
:value_type => ar.type,
|
69
|
-
:searchable => searchable,
|
70
|
-
:sortable => sortable,
|
71
|
-
:editable => edit
|
72
|
-
}.merge(options)
|
73
|
-
colModel << GridColumn.new( args)
|
74
|
-
|
75
|
-
else
|
76
|
-
# create column from scratch
|
77
|
-
args = {
|
78
|
-
:name => name,
|
79
|
-
:value_type => :string,
|
80
|
-
:searchable => searchable,
|
81
|
-
:sortable => sortable,
|
82
|
-
:editable => edit
|
83
|
-
}.merge(options)
|
84
|
-
colModel << GridColumn.new( args)
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
def column_names
|
89
|
-
colModel.collect {|col| col.name.titleize }
|
90
|
-
end
|
91
|
-
|
92
|
-
def column_model
|
93
|
-
colModel.collect {|col| col.properties }
|
94
|
-
end
|
95
|
-
|
96
|
-
# normally we need to keep columns an ordered array, sometimes its convenient to have a hash
|
97
|
-
def columns_hash
|
98
|
-
colModel.inject({}) {|h, col| h[col.name] = col; h }
|
99
|
-
end
|
100
|
-
|
101
|
-
protected
|
102
|
-
|
103
|
-
# # isnt there something in rails to do this already?
|
104
|
-
# def parse_options( keys, options )
|
105
|
-
# ops = keys.inject({}) do |h, k|
|
106
|
-
# val = options.delete(k)
|
107
|
-
# h[k] = val unless val.nil?
|
108
|
-
# h
|
109
|
-
# end
|
110
|
-
# ops || {}
|
111
|
-
# end
|
112
|
-
|
113
|
-
# generate list of columns based on AR model
|
114
|
-
# option: :only or :except
|
115
|
-
# :col_options hash of hash of preset values for columns (eg from cookie) { :title => {:width => 98}}
|
116
|
-
def build_columns( klass, only, except, presets, col_include )
|
117
|
-
#debugger
|
118
|
-
# stringify
|
119
|
-
only = Array(only).map {|s| s.to_s }
|
120
|
-
except = Array(except).map {|s| s.to_s }
|
121
|
-
presets ||= {}
|
122
|
-
presets.stringify_keys!
|
123
|
-
|
124
|
-
self.colModel = klass.columns.collect do |ar|
|
125
|
-
#debugger
|
126
|
-
next if only.present? && !only.include?(ar.name)
|
127
|
-
next if except.present? && except.include?(ar.name)
|
128
|
-
is_key = (ar.name=='id')
|
129
|
-
edit = editable && !is_key &&
|
130
|
-
# only edit accessible attributes
|
131
|
-
(klass.accessible_attributes.nil? || klass.accessible_attributes.include?(ar.name))
|
132
|
-
args = {
|
133
|
-
:ar_column => ar,
|
134
|
-
:name => ar.name,
|
135
|
-
:value_type => ar.type,
|
136
|
-
:key => is_key,
|
137
|
-
#:hidden => is_key,
|
138
|
-
:searchable => searchable,
|
139
|
-
:sortable => sortable,
|
140
|
-
:editable => edit
|
141
|
-
}
|
142
|
-
# create column with default args merged with options given for this column
|
143
|
-
GridColumn.new args.merge( presets[ar.name]||{} )
|
144
|
-
end.compact
|
145
|
-
end
|
146
|
-
end
|
147
|
-
end
|
@@ -1,134 +0,0 @@
|
|
1
|
-
module Gridify
|
2
|
-
class GridColumn
|
3
|
-
|
4
|
-
attr_accessor :name, # attribute name (required)
|
5
|
-
:label,
|
6
|
-
:ar_column, # active_record column
|
7
|
-
:value_type, # active_record data type :string, :text, :integer, :float, :boolean, + :currency
|
8
|
-
:key, # true if this is the key (only :id)
|
9
|
-
|
10
|
-
# column formatting
|
11
|
-
:width, # initial width (150)
|
12
|
-
:fixed_width, # true = not resized when recalc fit to width
|
13
|
-
:formatter, # see jqGrid doc (based on value_type)
|
14
|
-
:format_options, # hash, see jqGrid doc (based on value_type)
|
15
|
-
:align, # 'left', 'right', 'center' (left for strings, right for numerics)
|
16
|
-
#:classes, # optional classes to add to column
|
17
|
-
|
18
|
-
# column actions
|
19
|
-
:resizable, # t/f (true)
|
20
|
-
:sortable, # t/f (true) or jqGrid sorttype: :integer, :float, :currency, :date, :text (true)
|
21
|
-
:searchable, # true/false (true) or text or select
|
22
|
-
#:search_options,
|
23
|
-
:editable, # true/false (false),
|
24
|
-
:edit_type, # text, textarea, select, checkbox, password, button, image and file (based on value_type)
|
25
|
-
:edit_options, # html input field options, depends on editable type (eg {"size" => 10, "maxlength" => 15}) see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules
|
26
|
-
:validations, # jqGrid editrules (TODO derive from AR model validations) see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules
|
27
|
-
# "required" "integer" "email" "url" etc
|
28
|
-
:form_options, # jqGrid formoptions for formatting input forms
|
29
|
-
# select types
|
30
|
-
#:select_url, # url to dynamically get select options
|
31
|
-
|
32
|
-
# visiblity
|
33
|
-
#:always_hidden, # (false)
|
34
|
-
:sort_type,
|
35
|
-
:summary_type,
|
36
|
-
:summary_tpl,
|
37
|
-
:hidden # initial hide state (false)
|
38
|
-
|
39
|
-
def initialize(options)
|
40
|
-
update options
|
41
|
-
end
|
42
|
-
|
43
|
-
def update(options)
|
44
|
-
options.each {|atr, val| send( "#{atr}=", val )}
|
45
|
-
end
|
46
|
-
|
47
|
-
def to_json
|
48
|
-
properties.to_json #_with_js
|
49
|
-
end
|
50
|
-
|
51
|
-
def properties
|
52
|
-
jqgrid_properties
|
53
|
-
end
|
54
|
-
|
55
|
-
def resizable
|
56
|
-
if @resizable==false
|
57
|
-
false
|
58
|
-
else
|
59
|
-
# true or nil
|
60
|
-
true
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def fixed_width
|
65
|
-
if @fixed_width==false
|
66
|
-
false
|
67
|
-
elsif @fixed_width.nil?
|
68
|
-
!resizable
|
69
|
-
else
|
70
|
-
@fixed_width
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
# ----------------
|
75
|
-
private
|
76
|
-
|
77
|
-
def jqgrid_type
|
78
|
-
return sortable unless sortable==true
|
79
|
-
case value_type
|
80
|
-
when :string : 'text'
|
81
|
-
when :text : 'text'
|
82
|
-
when :integer : 'integer'
|
83
|
-
when :float : 'float'
|
84
|
-
when :boolean : 'boolean'
|
85
|
-
when :datetime : 'date'
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
# note, we dont vals[:foo] = foo because dont want to bother generating key if its same as jqGrid default
|
90
|
-
def jqgrid_properties
|
91
|
-
vals = {
|
92
|
-
:name => name,
|
93
|
-
:index => name
|
94
|
-
}
|
95
|
-
#xmlmap not required when same as :name
|
96
|
-
# vals[:xmlmap] = name if data_type == :xml
|
97
|
-
# vals[:jsonmap] = name if data_type == :json
|
98
|
-
|
99
|
-
vals[:label] = label || name.titleize
|
100
|
-
vals[:resizable] = false if resizable==false
|
101
|
-
vals[:fixed] = fixed_width unless fixed_width==false
|
102
|
-
vals[:sortable] = false if sortable==false
|
103
|
-
vals[:sort_type] = jqgrid_type if sortable
|
104
|
-
vals[:search] = false if searchable==false
|
105
|
-
vals[:editable] = true if editable
|
106
|
-
vals[:align] = align if align
|
107
|
-
#vals[:align] = 'right' if [:integer, :float, :currency].include?(value_type)
|
108
|
-
case value_type
|
109
|
-
when :datetime
|
110
|
-
vals[:formatter] = 'date'
|
111
|
-
vals[:formatoptions] = { :srcformat => 'UniversalSortableDateTime', :newformat => 'FullDateTime' }
|
112
|
-
end
|
113
|
-
vals[:hidden] = true if hidden
|
114
|
-
vals[:width] = width if width
|
115
|
-
vals[:formatter] = formatter if formatter
|
116
|
-
vals[:formatoptions] = format_options if format_options
|
117
|
-
vals[:edittype] = edit_type if editable && edit_type
|
118
|
-
vals[:formoptions] = form_options if editable && form_options
|
119
|
-
vals[:editoptions] = edit_options if editable && edit_options
|
120
|
-
vals[:editrules] = validations if editable && validations
|
121
|
-
|
122
|
-
vals[:sort_type] = sort_type if sort_type
|
123
|
-
vals[:summaryType] = summary_type if summary_type
|
124
|
-
vals[:summaryTpl] = summary_tpl if summary_tpl
|
125
|
-
# and more...
|
126
|
-
|
127
|
-
vals
|
128
|
-
end
|
129
|
-
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
#<ActiveRecord::ConnectionAdapters::SQLiteColumn:0x2515a98 @sql_type="varchar(255)", @name="title", @precision=nil, @primary=false, @default=nil, @limit=255, @null=true, @type=:string, @scale=nil>
|
134
|
-
|