Skip to content

Instantly share code, notes, and snippets.

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'));
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);
}
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
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 {
require "bundler/capistrano"
set :application, "we-cms"
set :repository, "git@github.com: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
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
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;
SG.groupsUserFilter = SC.Object.create({
allUsersBinding:"SG.usersController.arrangedObjects",
users:function() {
var a = this.get('allUsers');
if(!a) return null;
return a.filter(function(user) {
if(user.get('superAdmin')) return NO;
if(user.get('clientAdmin')) return NO;
if(user.get('contentAdmin')) return YES;
Installing pg (0.10.0) with native extensions /opt/ruby/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/ruby/bin/ruby extconf.rb
Gem files will remain installed in /we/cms/shared/bundle/ruby/1.9.1/gems/pg-0.10.0 for inspection.
Results logged to /we/cms/shared/bundle/ruby/1.9.1/gems/pg-0.10.0/ext/gem_make.out
from /opt/ruby/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
from /opt/ruby/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
from /opt/ruby/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
SG.SelectView = SC.View.extend({
displayProperties:['items', 'itemTitleKey', 'itemValueKey'],
tagName:"select",
render:function(ctx, first) {
ctx.addClass('sg-select');
if(!this.get('isEnabled')) {