This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .spinner { | |
| margin: auto; | |
| height: 20px; | |
| width: 20px; | |
| -webkit-animation: spin 1.5s linear infinite; | |
| -moz-animation: spin 1.5s linear infinite; | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App.DateField = Ember.TextField.extend | |
| didInsertElement: -> | |
| self = this | |
| this.$().datepicker({format: 'dd.mm.yyyy'}).on 'changeDate', -> | |
| self.$().trigger('change') | |
| {{view App.DateField valueBinding="mydate"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #List of product ids in sorted order. Get from jqueryui sortable plugin. | |
| #product_ids = [3,1,2,4,7,6,5] | |
| #product_ids.each_with_index do |id, index| | |
| # Product.where(id: id).update_all(sort_order: index+1) | |
| #end | |
| ##CASE syntax example: | |
| ##Product.where(id: product_ids).update_all("sort_order = CASE id WHEN 539 THEN 1 WHEN 540 THEN 2 WHEN 542 THEN 3 END") |
NewerOlder