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
| describe 'Scheduler Model', -> | |
| describe 'when instantiated', -> | |
| it 'should exhibit attributes', -> | |
| scheduler = new Augury.Models.Scheduler count: '10', interval: 'days' | |
| expect(scheduler.get('count')).toEqual('10') |
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
| <div class="field"> | |
| <label for="registration-keys">Keys</label> | |
| <div class="error"></div> | |
| <div class="select2-container select2-container-multi select2 fullwidth" id="s2id_registration-keys"> | |
| <ul class="select2-choices"> | |
| <li class="select2-search-field"> | |
| <input type="text" autocomplete="off" class="select2-input" style="width: 20px;"> | |
| </li> | |
| </ul> | |
| </div> |
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
| valid: (view, attr, selector) -> | |
| element = view.$('[' + selector + '~="' + attr + '"]') | |
| element.removeClass("invalid") | |
| element.prev('div.error').html('') | |
| view.$('fieldset .error-message').html('') | |
| return true |
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
| buildEventKey: -> | |
| eventKey = new Object() | |
| $.each @$('.event-keys .row'), (index, value) => | |
| name = @$(value).find('input#name').first().val() | |
| path = @$(value).find('input#path').first().val() | |
| if path && name | |
| eventKey[name] = path | |
| eventKeyJSON = JSON.stringify(eventKey) | |
| @$('.event-keys').append("<input id='registration-event-key' name='event-key' type='hidden' value='#{eventKeyJSON}' />") | |
| @model.set(event_key: @$('input[name=event-key]').val()) |
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
| " Copy gist link to clipboard | |
| let g:gist_clip_command = 'pbcopy' |
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
| " ================ Statusline Settings ================= | |
| " Show the statusline all the time | |
| set laststatus=2 | |
| " Useful status information at bottom of screen | |
| set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P |
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
| use Rack::Runtime | |
| use Rack::MethodOverride | |
| use ActionDispatch::RequestId | |
| use Rails::Rack::Logger | |
| use ActionDispatch::ShowExceptions | |
| use ActionDispatch::DebugExceptions | |
| use ActionDispatch::RemoteIp | |
| use ActionDispatch::Reloader | |
| use ActionDispatch::Callbacks | |
| use ActionDispatch::Cookies |
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
| init = -> | |
| $scope.pageTitle = "Edit Registration" | |
| Registration.get({ id: $routeParams.id }).then (result) -> | |
| $scope.registration = result | |
| setKeys($scope.registration) | |
| setKeys = (registration) -> | |
| Registration.availableKeys().then (result) -> | |
| $scope.availableKeys = result |
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
| init = -> | |
| $scope.pageTitle = "Edit Registration" | |
| $scope.registration = {} | |
| Registration.get({ id: $routeParams.id }).then (result) -> | |
| $scope.registration = result | |
| setKeys($scope.registration) | |
| setKeys = (registration) -> | |
| Registration.availableKeys().then (result) -> |
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
| angular.module('AuguryAdmin').controller 'RegistrationsCtrl' | |
| , ['$scope', '$location', 'Registration', 'SelectedRegistration', 'pageData' | |
| , ($scope, $location, Registration, SelectedRegistration, pageData) -> | |
| init = -> | |
| $scope.registrations = Registration.query() | |
| $scope.storeName = pageData.storeName | |
| $scope.createRegistration = -> | |
| $location.path '/new' |