This file contains 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
var editor = new SGU.ScreenEditor('SGScreenEditor', | |
{screenWidth: SG.screenLayoutController.get('width'), | |
screenHeight:SG.screenLayoutController.get('height')}); | |
SG.currentScreenEditor = editor; | |
var surfaces = SG.screenLayoutController.get('surfaces'); | |
editor._surfaces = surfaces; | |
surfaces.forEach(function (s) { | |
s._zone = new SGU.ScreenEditor.Zone(editor); | |
s.addObserver('status', {cb:function(obj) { | |
console.log('status'); |
This file contains 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
didCreateLayer:function() { | |
var bl = SG.broadcastLocationsController.get('firstObject'); | |
console.log('createLayer'); | |
if(!bl) return; | |
var redMarker = new google.maps.MarkerImage( | |
static_url('/images/2.png'), | |
new google.maps.Size(20, 20), | |
new google.maps.Point(0, 20) | |
); |
This file contains 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
broadcastLocationsBinding:'SG.broadcastLocationsController', | |
_broadcastLocationsDidChange:function() { | |
console.log('bl changes'); | |
}.observes('broadcastLocations.[]'), |
This file contains 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
clients:function() { | |
var bl = this.get('broadcastLocation'); | |
if(!bl) return null; | |
var surfaces = bl.getPath('screenLayout.surfaces'); | |
var clients = []; | |
surfaces.forEach(function(surface) { | |
console.log(surface.toString()); | |
//console.log(surface.get('client')); | |
clients.pushObject(surface.get('client')); |
This file contains 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
var createEditor = function(template_id, mode, content_id) { | |
var url = { | |
'uploadURL': '/resources/upload/', | |
'proxyURL': '/proxy?url=', | |
}; | |
if(mode === 'template') { | |
url.saveURL = '/templates/save_edition/'; | |
url.loadURL = '/templates/'+template_id+'.json'; | |
return new Editor('#content', '#EditorBar', 'design', 'design', url); | |
} |
This file contains 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
server { | |
listen 80; | |
client_max_body_size 50M; | |
server_name a3.walking-the-edit.net; | |
location / { | |
root /we/cms/current/public; | |
try_files /system/maintenance.html $uri $uri/index.html $uri.html @unicorn; | |
} | |
location @unicorn { |
This file contains 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
require "bundler/capistrano" | |
set :application, "we-cms" | |
set :repository, "[email protected]:goyman/we-cms.git" | |
set :scm, :git | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
role :web, "we2" # Your HTTP server, Apache/etc |
This file contains 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
socket_path = '/we/cms/shared/sockets/unicorn.sock' | |
pid_path = '/we/cms/shared/pids/unicorn.pid' | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
worker_processes 3 | |
preload_app true | |
timeout 75 |
This file contains 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 RESTController < ApplicationController | |
rescue_from 'Acl9::AccessDenied', :with => :access_denied | |
respond_to :json | |
@@json_show_options = {} | |
@@json_list_options = {} | |
def self.set_json_show_options opts | |
@@json_show_options = opts | |
end | |
def self.set_json_list_options opts |
This file contains 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
SG.groupsUsersController = GN.SearchableArrayController.create({ | |
contentBinding:SC.Binding.oneWay("SG.groupsUserFilter.users") | |
}); | |
SG.groupsUserFilter = SC.Object.create({ | |
allUsersBinding:"SG.usersController.arrangedObjects", | |
users:function() { | |
var a = this.get('allUsers'); | |
console.log(a); | |
if(!a) return null; |
OlderNewer