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
| <!DOCTYPE html> | |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
| <head> | |
| <title>Squabbler Publisher</title> | |
| <link href="/assets/publisher.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
| <link href="/assets/video-js.css?body=1" media="all" rel="stylesheet" type="text/css" /> |
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
| <%= form_for [:publisher, @site, @single_widget], builder: FoundationFormBuilder, html: { role: "single-widget-form" } do |form| %> | |
| <div role="form"> | |
| <%= form.errors_list %> | |
| <%= field_set_tag "Basic Information" do %> | |
| <%= render "publisher/widgets/basic_info_fields", form: form %> | |
| <% end %> | |
| <%= field_set_tag "Advanced Settings" do %> |
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
| <%= form.fields_for :widget_videos do |widget_video| %> | |
| <%= render "publisher/widgets/widget_video_fields", widget_video_fields: widget_video %> | |
| <% end %> | |
| </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
| def single_widget_params | |
| params.require(:single_widget).permit( | |
| :title, :max_votes_per_day, :expires_at_date, :cms_title, | |
| :expires_at_time, :logo, :logo_cache, :start_screen_text, :tos_text, :recording_tips, :hashtags, | |
| :id, :respond_button_color, :respond_button_font_color, | |
| :video_max_length, | |
| widget_video: [ | |
| video_attributes: [ | |
| :id, :creation_mode, :description, :username, :embed_code, | |
| :cover_photo, :cover_photo_cache, :tag_list |
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
| videojs @$("video")[0], { | |
| 1 techOrder: ["html5", "flash"] | |
| 2 preload: "auto" | |
| 3 }, () -> | |
| 4 @videoPlayer = @ | |
| 5 console.log "VID PLAYER" | |
| 6 console.log @videoPlayer | |
| 7 | |
| 8 SQ.Widget.Application.hideLoader() | |
| 9 |
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
| <!DOCTYPE html> | |
| 1 <html> | |
| 2 <head> | |
| 3 <meta charset="utf-8"> | |
| 4 <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script> | |
| 5 <body> | |
| 6 <input type="file" accept="/*" capture="camera"/> | |
| 7 <script> | |
| 8 var input = document.querySelector('input[type=file]'); | |
| 9 |
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
| class App.Screen.Views.ScreensView extends Backbone.View | |
| initialize: -> | |
| @sv = App.Screen.Views.ScreenView | |
| @collection.on "add", @addOne, @ | |
| @collection.on "reset", @addAll, @ | |
| addOne: (screenItem) -> | |
| screenView = new @sv({model: screenItem}) | |
| @$el.append(screenView.render().el) | |
| #good here |
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
| class Publisher::CommunityUsersTable < TableCloth::Base | |
| presenter SortableTablePresenter | |
| column :username_in_table, label: "Username" | |
| column :auth_provider_decorated, label: "Auth", sort_by: :provider | |
| column :email_decorated, label: "Email", sort_by: :email | |
| column :user_since, label: "User Since", sort_by: :created_at | |
| column :latest_activity, label: "Latest Activity", sort_by: :last_sign_in_at | |
| column :karma, label: "Rank", sort_by: :karma | |
| column :number_of_submissions, label: "Submissions" |
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
| # Wanted to do this just with stdlib and do it in a firehose | |
| # type fashion | |
| # Could have used their bigdata interface but hey | |
| # | |
| # A lot more that could be done, validation of input dates, retry queue, | |
| # logging etc... | |
| require 'date' | |
| require 'open-uri' | |
| require 'zlib' |
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
| _ended: (vote_flag, hasVotedCookie) -> | |
| @ended = true | |
| $.modal $("#inter"), | |
| close: false | |
| maxHeight: 300 | |
| onClose: => @_endItAll() | |
| $('.countdown').countdown | |
| until: +5 | |
| format: 'S' |
OlderNewer