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
@@ -1,223 +0,0 @@
|
|
1
|
-
module Gridify
|
2
|
-
class Grid
|
3
|
-
|
4
|
-
attr_accessor :search_rules, # current search/filter rules, as hash
|
5
|
-
:search_rules_op # :and, :or
|
6
|
-
|
7
|
-
# finds records based on request params
|
8
|
-
# e.g. params from jqGrid
|
9
|
-
# :_search do search (true/false) ["false"]
|
10
|
-
# :sidx sort index (column to search on) [""]
|
11
|
-
# :sord sort direction (desc/asc) ["asc"]
|
12
|
-
# :nd ?
|
13
|
-
# :rows number of items to get ["20"]
|
14
|
-
# :page page number (starts at 1) ["1"]
|
15
|
-
|
16
|
-
def update_from_params( params )
|
17
|
-
params.symbolize_keys!
|
18
|
-
params_to_rules params
|
19
|
-
self.data_type = params[:datatype] if params[:datatype]
|
20
|
-
self.sort_by = params[:sidx] if params[:sidx]
|
21
|
-
self.sort_order = params[:sord] if params[:sord]
|
22
|
-
self.current_page = params[:page].to_i if params[:page]
|
23
|
-
self.rows_per_page = params[:rows].to_i if params[:rows]
|
24
|
-
self.total_rows = params[:total_rows].to_i if params[:total_rows]
|
25
|
-
end
|
26
|
-
|
27
|
-
# return find args (scope) for current settings
|
28
|
-
def current_scope
|
29
|
-
#debugger
|
30
|
-
find_args = {}
|
31
|
-
find_args[:include] = colInclude if colInclude
|
32
|
-
if sort_by.present? && col = columns_hash[sort_by]
|
33
|
-
if (sort_by.include? ".")
|
34
|
-
# Workaround for :include and nested attributes
|
35
|
-
field = sort_by.split('.', 2)
|
36
|
-
if field.length == 2
|
37
|
-
self.sort_by = field[0].pluralize + "." + field[1]
|
38
|
-
end
|
39
|
-
end
|
40
|
-
if case_sensitive || !([:string, :text].include?(col.value_type))
|
41
|
-
find_args[:order] = "#{sort_by} #{sort_order}"
|
42
|
-
else
|
43
|
-
find_args[:order] = "upper(#{sort_by}) #{sort_order}"
|
44
|
-
end
|
45
|
-
end
|
46
|
-
if total_rows.present? && total_rows > 0
|
47
|
-
find_args[:limit] = total_rows
|
48
|
-
offset = (current_page.to_i-1) * rows_per_page if current_page.present?
|
49
|
-
find_args[:offset] = offset if offset && offset > 0
|
50
|
-
elsif rows_per_page.present? && rows_per_page > 0
|
51
|
-
find_args[:limit] = rows_per_page
|
52
|
-
offset = (current_page.to_i-1) * rows_per_page if current_page.present?
|
53
|
-
find_args[:offset] = offset if offset && offset > 0
|
54
|
-
end
|
55
|
-
cond = rules_to_conditions
|
56
|
-
find_args[:conditions] = cond unless cond.blank?
|
57
|
-
find_args
|
58
|
-
end
|
59
|
-
|
60
|
-
def find( params )
|
61
|
-
#debugger
|
62
|
-
update_from_params params
|
63
|
-
klass = resource.classify.constantize
|
64
|
-
records = klass.send( finder, :all, current_scope )
|
65
|
-
end
|
66
|
-
|
67
|
-
def encode_records( records, userdata=nil, total_count=nil )
|
68
|
-
#debugger
|
69
|
-
klass = resource.classify.constantize
|
70
|
-
total_count ||= klass.count
|
71
|
-
total_pages = total_count / rows_per_page + 1
|
72
|
-
#TODO: :only => [attributes], :methods => [virtual attributes]
|
73
|
-
case data_type
|
74
|
-
when :xml
|
75
|
-
if colInclude
|
76
|
-
xml = records.to_xml( :include => colInclude, :skip_types => true, :dasherize => false ) do |xml|
|
77
|
-
if rows_per_page > 0
|
78
|
-
xml.page current_page
|
79
|
-
xml.total total_pages
|
80
|
-
xml.records total_count
|
81
|
-
end
|
82
|
-
end
|
83
|
-
else
|
84
|
-
xml = records.to_xml( :skip_types => true, :dasherize => false ) do |xml|
|
85
|
-
if rows_per_page > 0
|
86
|
-
xml.page current_page
|
87
|
-
xml.total total_pages
|
88
|
-
xml.records total_count
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
when :json
|
93
|
-
#debugger
|
94
|
-
data = { resource => records }
|
95
|
-
if rows_per_page > 0
|
96
|
-
data.merge!(
|
97
|
-
:page => current_page,
|
98
|
-
:total => total_pages,
|
99
|
-
:records => total_count
|
100
|
-
)
|
101
|
-
end
|
102
|
-
data.merge!( :userdata => userdata ) if userdata
|
103
|
-
save = ActiveRecord::Base.include_root_in_json
|
104
|
-
ActiveRecord::Base.include_root_in_json = false
|
105
|
-
if colInclude
|
106
|
-
json = data.to_json(:include => colInclude)
|
107
|
-
else
|
108
|
-
json = data.to_json
|
109
|
-
end
|
110
|
-
ActiveRecord::Base.include_root_in_json = save
|
111
|
-
json
|
112
|
-
#others...
|
113
|
-
else #nop ?
|
114
|
-
records.to_s
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
def find_and_encode( params )
|
119
|
-
encode_records( find( params ) )
|
120
|
-
end
|
121
|
-
|
122
|
-
# grid doesnt nest attributes inside the resource
|
123
|
-
# could change this behavior in jqGrid, see grid.postext.js ?
|
124
|
-
# http://www.trirand.com/jqgridwiki/doku.php?id=wiki:post_data_module
|
125
|
-
#
|
126
|
-
def member_params( params )
|
127
|
-
params.inject({}) {|h, (name, value)| h[name] = value if columns_hash[name]; h }
|
128
|
-
end
|
129
|
-
|
130
|
-
protected
|
131
|
-
|
132
|
-
OPS = { 'eq' => '=', 'lt' => '<', 'le' => '<=', 'gt' => '>', 'ge' => '>=', 'ne' => '!=' }
|
133
|
-
#['eq','ne','lt','le','gt','ge',
|
134
|
-
# 'bw','bn','in','ni','ew','en','cn','nc']
|
135
|
-
#['equal','not equal', 'less', 'less or equal','greater','greater or equal',
|
136
|
-
# 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain']
|
137
|
-
|
138
|
-
OPS_PATTERN = {
|
139
|
-
'bw' => '?%',
|
140
|
-
'bn' => '?%',
|
141
|
-
# 'in'
|
142
|
-
# 'ni'
|
143
|
-
'ew' => '%?',
|
144
|
-
'en' => '%?',
|
145
|
-
'cn' => '%?%',
|
146
|
-
'nc' => '%?%',
|
147
|
-
}
|
148
|
-
|
149
|
-
STRING_OPS = {
|
150
|
-
'bw' => 'LIKE',
|
151
|
-
'bn' => 'NOT LIKE',
|
152
|
-
'ew' => 'LIKE',
|
153
|
-
'en' => 'NOT LIKE',
|
154
|
-
'cn' => 'LIKE',
|
155
|
-
'nc' => 'NOT LIKE',
|
156
|
-
}
|
157
|
-
|
158
|
-
# params[:filters] => {"groupOp"=>"AND",
|
159
|
-
# "rules"=>[{"data"=>"b", "op"=>"ge", "field"=>"title"}, {"data"=>"f", "op"=>"le", "field"=>"title"}] }
|
160
|
-
def params_to_rules( params )
|
161
|
-
#debugger
|
162
|
-
if params[:_search]=='true' || params[:_search]==true
|
163
|
-
if params[:filters]
|
164
|
-
# advanced search
|
165
|
-
filters = ActiveSupport::JSON.decode( params[:filters] )
|
166
|
-
self.search_rules = filters['rules']
|
167
|
-
self.search_rules_op = filters['groupOp']
|
168
|
-
elsif params[:searchField]
|
169
|
-
# simple search
|
170
|
-
self.search_rules = [{ "field" => params[:searchField], "op" => params[:searchOper], "data" => params[:searchString]}]
|
171
|
-
else
|
172
|
-
# toolbar search
|
173
|
-
self.search_rules = []
|
174
|
-
self.search_rules_op = :and
|
175
|
-
colModel.each do |col|
|
176
|
-
name = col.name
|
177
|
-
data = params[name.to_sym]
|
178
|
-
self.search_rules << { "field" => name, "op" => "cn", "data" => data } if data
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
search_rules
|
183
|
-
end
|
184
|
-
|
185
|
-
def rules_to_conditions
|
186
|
-
# note: ignoring case_sensitive as an option, ActiveRecord find is insensitive by default (have to model the db to let it be case sensitive?)
|
187
|
-
return nil if search_rules.blank?
|
188
|
-
cond = nil
|
189
|
-
expr = ''
|
190
|
-
vals = []
|
191
|
-
search_rules.each do |rule|
|
192
|
-
|
193
|
-
# Workaround for :include and nested attributes
|
194
|
-
field = rule['field'].split('.', 2)
|
195
|
-
if field.length == 2
|
196
|
-
rule['field'] = field[0].pluralize + "." + field[1]
|
197
|
-
end
|
198
|
-
|
199
|
-
expr << " #{search_rules_op} " unless expr.blank?
|
200
|
-
if op = OPS[rule['op']]
|
201
|
-
expr << "#{rule['field']} #{op} ?"
|
202
|
-
vals << rule['data']
|
203
|
-
elsif op = STRING_OPS[rule['op']]
|
204
|
-
expr << "#{rule['field']} #{op} ?"
|
205
|
-
vals << OPS_PATTERN[rule['op']].gsub('?', rule['data'])
|
206
|
-
end
|
207
|
-
end
|
208
|
-
cond = [ expr ] + vals
|
209
|
-
end
|
210
|
-
end
|
211
|
-
end
|
212
|
-
|
213
|
-
# # If you need to display error messages
|
214
|
-
# err = ""
|
215
|
-
# if user
|
216
|
-
# user.errors.entries.each do |error|
|
217
|
-
# err << "<strong>#{error[0]}</strong> : #{error[1]}<br/>"
|
218
|
-
# end
|
219
|
-
# end
|
220
|
-
#
|
221
|
-
# render :text => "#{err}"
|
222
|
-
|
223
|
-
# { :add => true, :edit => true, :inline_edit => false, :delete => true, :edit_url => "/users/post_data", :error_handler => "after_submit" }
|
@@ -1,279 +0,0 @@
|
|
1
|
-
module Gridify
|
2
|
-
class Grid
|
3
|
-
# non persistent options:
|
4
|
-
# :build_model
|
5
|
-
# :only
|
6
|
-
# :except
|
7
|
-
|
8
|
-
attr_accessor :name, # name of the table (required)
|
9
|
-
:resource, # based on AR model class (assume tableized, plural, string)
|
10
|
-
# used as basis for all RESTful requests and data format
|
11
|
-
# model
|
12
|
-
:colModel, # incoming: hash of presets (native jqGrid); internally: array of GridColumn objects
|
13
|
-
# { :body => { "title" => {"width" => 98} }}
|
14
|
-
:colNames, # Column names
|
15
|
-
:colInclude, # included submodels
|
16
|
-
#:widths, # hash of column width (key = data type)
|
17
|
-
:searchable, # default: true (used in generating columns, changing has no effect on existing cols)
|
18
|
-
:sortable, # default: true (used in generating columns, changing has no effect on existing cols)
|
19
|
-
:editable, # default: false (used in generating columns, changing has no effect on existing cols)
|
20
|
-
:inline_edit,
|
21
|
-
:inline_edit_handler,
|
22
|
-
# grid
|
23
|
-
:dom_id, # defaults to #{resource}_#{name} eg "notes_grid"
|
24
|
-
:grid_view,
|
25
|
-
:jqgrid_options, # hash of additional jqGrid options that override any other settings
|
26
|
-
:ajax_grid_options,
|
27
|
-
#subgrid
|
28
|
-
:sub_grid,
|
29
|
-
:sub_grid_url,
|
30
|
-
:sub_grid_model,
|
31
|
-
# grid layout options
|
32
|
-
:width, # in pixels, or nil (nil means calculated based on overflow setting)
|
33
|
-
:width_fit, # :fluid, :scroll, or :visible
|
34
|
-
# :fluid will always fit container (presently ignores width option)
|
35
|
-
# :scroll uses horizontal scrollbars
|
36
|
-
# :fitted scales columns to fit in width, not fluid
|
37
|
-
:height, # in pixels, '100%', or :auto (150)
|
38
|
-
# :auto means makes it as tall as needed per number of rows
|
39
|
-
:resizable, # allow gride resize with mouse, (true) (or {}) for default options;
|
40
|
-
# nil or false for disabled; or hash of jqUI options
|
41
|
-
# see http://jqueryui.com/demos/resizable/
|
42
|
-
# defaults (differ from jqUI ones) "minWidth" => 150, "minHeight" => 80
|
43
|
-
# when overflow is fluid, "handles" => 's', otherwise 'e, s, se'
|
44
|
-
:arranger, # :sortable, :hide_show, :chooser, or nil for none (nil) ,
|
45
|
-
# can combine with array of options
|
46
|
-
# or can be a hash with options
|
47
|
-
# see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:show_hide_columns
|
48
|
-
# rows
|
49
|
-
:alt_rows, # true for odd/even row classes, or odd row style name string (nil)
|
50
|
-
:row_numbers, # true to display row numbers in left column; or numeric width in pixels (nil)
|
51
|
-
:select_rows, # true for rows are selectable (eg for pager buttons); or js function when row is selected, false disables hover (true if pager buttons else false)
|
52
|
-
:multi_select,
|
53
|
-
:sortable_rows,
|
54
|
-
# header layer
|
55
|
-
:title, # title string (aka caption), or true for resource.titleize, nil for no title (nil)
|
56
|
-
:collapsible, # when true generates collapse icon (false)
|
57
|
-
:collapsed, # when true initial state is collapsed (false)
|
58
|
-
|
59
|
-
# pager layer
|
60
|
-
:pager, # id of the pager, or true => dom_id+"_pager", false or nil for no pager (nil)
|
61
|
-
:paging_controls, # false to disable all (true); or hash with native jqGrid options
|
62
|
-
:paging_choices, # array of rows_per_page choices ([10,25,50,100])
|
63
|
-
# nav buttons
|
64
|
-
:view_button, # true, or hash of native jqGrid parameters and events for the action
|
65
|
-
:add_button,
|
66
|
-
:edit_button,
|
67
|
-
:delete_button,
|
68
|
-
:search_button, # enable search button and dialog
|
69
|
-
:search_advanced, # instead of search_button
|
70
|
-
:search_toolbar, # toggleable search bar, true or :visible, :hidden (other options?) (nil)
|
71
|
-
:refresh_button,
|
72
|
-
:jqgrid_nav_options, # native jqGrid button options (added to 2nd arg in navGrid method)
|
73
|
-
# data
|
74
|
-
:restful, # use restful url and mtype (true) for all actions
|
75
|
-
:finder, # default: :find
|
76
|
-
:url, # request url (required unless table_to_grid or derived from resource)
|
77
|
-
# if nil, uses "/#{resource}" eg "/notes"
|
78
|
-
# note, to force "editurl" use jqgrid_options
|
79
|
-
|
80
|
-
:data_type, # :xml, :json, and other defined in jqGrid options doc (xml)
|
81
|
-
:data_format, # (defaults to rails conventin based on resource) <chickens><chicken><title><body> format
|
82
|
-
# set false for jqGrid default <rows><records><row><cell> format
|
83
|
-
:sort_by, # name of sort column of next request
|
84
|
-
:sort_order, # sort direction of next request, 'asc' or 'desc' ('asc')
|
85
|
-
:case_sensitive, # sort and search are case sensitive (false)
|
86
|
-
:current_page, # current page requested
|
87
|
-
:rows_per_page, # number of items to be requested in the next request (paging_choices.first or -1 if pager false)
|
88
|
-
:total_rows, # number of rows to read
|
89
|
-
:table_to_grid, # when true generates tableToGrid (false) from html table, then use as local data
|
90
|
-
# note, we assume table rows are not selectable.
|
91
|
-
# (tableToGrid sets multiselect when first col has checkboxes or radio buttons,
|
92
|
-
# we dont know to preserve this so you also need to set in options)
|
93
|
-
:load_once, # true to use local data after first load (false)
|
94
|
-
:error_handler, # javacript: method for crud error handling (default to "after_submit")
|
95
|
-
:error_container, # selector for posting error/flash messages (.errorExplanation)
|
96
|
-
# events
|
97
|
-
#:on_dbl_click_row,
|
98
|
-
#:on_sort_col,
|
99
|
-
#:serialize_grid_data,
|
100
|
-
|
101
|
-
:z
|
102
|
-
|
103
|
-
# ----------------------
|
104
|
-
# attribute defaults and special value handling
|
105
|
-
# (sure it'd be easier to initialize defaults using a hash but we want nil to mean the jqGrid default - might be true - and not pass a value at all)
|
106
|
-
|
107
|
-
def inline_edit
|
108
|
-
@inline_edit==true ? true : false
|
109
|
-
end
|
110
|
-
|
111
|
-
def inline_edit_handler
|
112
|
-
@inline_edit_handler || 'null'
|
113
|
-
end
|
114
|
-
|
115
|
-
def finder
|
116
|
-
@finder || :find
|
117
|
-
end
|
118
|
-
|
119
|
-
def searchable
|
120
|
-
@searchable==false ? false : true
|
121
|
-
end
|
122
|
-
|
123
|
-
def sortable
|
124
|
-
@sortable==false ? false : true
|
125
|
-
end
|
126
|
-
|
127
|
-
def sortable_rows
|
128
|
-
@sortable_rows==true ? true : false
|
129
|
-
end
|
130
|
-
|
131
|
-
def dom_id
|
132
|
-
@dom_id || "#{resource}_#{name}"
|
133
|
-
end
|
134
|
-
|
135
|
-
def grid_view
|
136
|
-
@grid_view==false ? false : true
|
137
|
-
end
|
138
|
-
|
139
|
-
def jqgrid_options
|
140
|
-
@jqgrid_options || {}
|
141
|
-
end
|
142
|
-
|
143
|
-
def ajax_grid_options
|
144
|
-
@ajax_grid_options || {}
|
145
|
-
end
|
146
|
-
|
147
|
-
def width_fit
|
148
|
-
@width_fit || :fluid
|
149
|
-
end
|
150
|
-
|
151
|
-
def resizable
|
152
|
-
return false if @resizable == false
|
153
|
-
rs = { "minWidth" => 150, "minHeight" => 80 }
|
154
|
-
rs.merge!({ "handles" => 's' }) if width_fit == :fluid
|
155
|
-
rs.merge!( @resizable ) if @resizable.is_a?(Hash)
|
156
|
-
rs
|
157
|
-
end
|
158
|
-
|
159
|
-
def arranger_type #read-only
|
160
|
-
if arranger.is_a?(Hash)
|
161
|
-
arranger.keys
|
162
|
-
else
|
163
|
-
Array(arranger)
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
def arranger_options(type) #read-only
|
168
|
-
(arranger[type] if arranger.is_a?(Hash)) || {}
|
169
|
-
end
|
170
|
-
|
171
|
-
def select_rows
|
172
|
-
if @select_rows
|
173
|
-
@select_rows
|
174
|
-
else
|
175
|
-
pager && (view_button || edit_button || delete_button)
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
# header layer
|
180
|
-
def title
|
181
|
-
case @title
|
182
|
-
when String: @title
|
183
|
-
when true: resource.titleize
|
184
|
-
else
|
185
|
-
(' ' if collapsible || collapsed) #show header with blank title
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
|
-
def collapsible
|
190
|
-
@collapsible || @collapsed
|
191
|
-
end
|
192
|
-
|
193
|
-
# pager layer
|
194
|
-
def pager
|
195
|
-
case @pager
|
196
|
-
when String: @pager
|
197
|
-
when true: dom_id+'_pager'
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
def paging_controls
|
202
|
-
@paging_controls.nil? ? true : @paging_controls
|
203
|
-
end
|
204
|
-
|
205
|
-
def paging_choices
|
206
|
-
@paging_choices || [10,25,50,100]
|
207
|
-
end
|
208
|
-
|
209
|
-
def restful
|
210
|
-
@restful==false ? false : true
|
211
|
-
end
|
212
|
-
|
213
|
-
# data
|
214
|
-
def url
|
215
|
-
@url || "/#{resource}"
|
216
|
-
end
|
217
|
-
|
218
|
-
def rows_per_page
|
219
|
-
#debugger
|
220
|
-
# all rows when pager controls or rows per page are off
|
221
|
-
if !pager || paging_controls==false || @rows_per_page==false || @rows_per_page==-1
|
222
|
-
-1
|
223
|
-
elsif @rows_per_page.nil?
|
224
|
-
paging_choices.first
|
225
|
-
else
|
226
|
-
@rows_per_page
|
227
|
-
end
|
228
|
-
end
|
229
|
-
|
230
|
-
def data_type
|
231
|
-
@data_type || :json
|
232
|
-
end
|
233
|
-
|
234
|
-
def data_format
|
235
|
-
if @data_format || @data_format==false #explicit false for no param
|
236
|
-
@data_format
|
237
|
-
elsif resource && data_type == :xml
|
238
|
-
{
|
239
|
-
:root => resource,
|
240
|
-
:page => resource+'>page',
|
241
|
-
:total => resource+'>total',
|
242
|
-
:records => resource+'>records',
|
243
|
-
:row => resource.singularize,
|
244
|
-
:repeatitems => false,
|
245
|
-
:id => :id
|
246
|
-
}
|
247
|
-
elsif resource && data_type == :json
|
248
|
-
{
|
249
|
-
:root => resource,
|
250
|
-
:page => 'page',
|
251
|
-
:total => 'total',
|
252
|
-
:records => 'records',
|
253
|
-
:row => resource.singularize,
|
254
|
-
:repeatitems => false,
|
255
|
-
:id => :id
|
256
|
-
}
|
257
|
-
end
|
258
|
-
end
|
259
|
-
|
260
|
-
# events
|
261
|
-
|
262
|
-
# def serialize_grid_data
|
263
|
-
# @serialize_grid_data || {}
|
264
|
-
# end
|
265
|
-
|
266
|
-
def error_handler
|
267
|
-
@error_handler || 'gridify_action_error_handler'
|
268
|
-
end
|
269
|
-
|
270
|
-
def error_handler_return_value
|
271
|
-
error_handler ? error_handler : 'true;'
|
272
|
-
end
|
273
|
-
|
274
|
-
def error_container
|
275
|
-
@error_container || '.errorExplanation'
|
276
|
-
end
|
277
|
-
|
278
|
-
end
|
279
|
-
end
|