Skip to content

Instantly share code, notes, and snippets.

View jdorrance's full-sized avatar

John Dorrance jdorrance

View GitHub Profile
/**
* The <code>CQ.form.MultiFieldMultiField</code> class represents an editable list
* of form fields for editing multi value properties.
*
* @class CQ.form.MultiFieldMultiField
* @extends CQ.form.CompositeField
*/
CQ.form.MultiFieldMultiField = CQ.Ext.extend(CQ.form.CompositeField, {
/**
CQ.Ext.ns "UserAdminOverride"
class UserAdminOverride
@originalLoadRecord = CQ.security.UserProperties.prototype.loadRecord
@connectRoomItem =
xtype: "textfield"
fieldLabel: "url field"
anchor: "100%"
vtype: "url"
import groovy.json.JsonSlurper
def nodesToProcess = getNodes("admin" , "admin" , "localhost:4502" , "geometrixx")
def sites = getSites("https://mavendc-utils.s3.amazonaws.com/test/data.json")
processSite("geometrixx" , nodesToProcess, sites , false)
def getSites(json){
new JsonSlurper().parseText(new URL(json).getText("UTF-8"))
}
define ["jquery", "mediaElement", "cq5-flowplayer"], ($, mediaelementplayer) ->
# boot up flash video
# legacy first
# proper HTML5 video and audio player using mediaelement
# be sure to set the plugin path so that when minified the flash and silverlight plugins
# are working as fallbacks, specificaly mp3 for FF.
# Youtube and vimeo component - fluid width video
init: ->
console.log "Media Players loaded using jQuery ", $.fn.jquery
define ["jquery"], ($) ->
init: ->
tag = document.createElement("script")
tag.src = "https://www.youtube.com/iframe_api"
firstScriptTag = document.getElementsByTagName("script")[0]
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag)
window.onYouTubePlayerAPIReady = ->
$(".acs-youtube-player").each ->
config = $(@).data("youtube")
@jdorrance
jdorrance / mongoose.conf
Created November 25, 2013 20:55
place this in the same folder of your mongoose EXE file
# Mongoose web server configuration file.
# For detailed description of every option, visit
# https://github.com/valenok/mongoose/blob/master/UserManual.md
# Lines starting with '#' and empty lines are ignored.
# To make a change, remove leading '#', modify option's value,
# save this file and then restart Mongoose.
listening_ports 80
error_log_file C:\Users\John\Google Drive\work\apps\MDC\localassets\error.log
document_root C:\apache\geo-media
/*
Syntax error: File to import not found or unreadable: mixins.
Load paths:
C:/Users/John/Google Drive/work/apps/acs/acs-bootstrap/sass
C:/PROGRA~2/Heroku/RUBY-1~1.2/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
C:/PROGRA~2/Heroku/RUBY-1~1.2/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
C:/Users/John/Google Drive/work/apps/acs/acs-bootstrap/components/sass-bootstrap/lib
Compass::SpriteImporter
on line 13 of C:/Users/John/Google Drive/work/apps/acs/acs-bootstrap/sass/acs-bootstrap.scss
@jdorrance
jdorrance / Felix config switch
Created November 15, 2013 21:31
CQ5 bookmarklets
javascript:(function() { window.location.href = (window.location.protocol +"//" + window.location.host + "/system/console/configMgr"); })()
CQ.Ext.override CQ.wcm.Sidekick,
addButtons: ->
bbar = @getBottomToolbar()
bbar.removeAll true
bbar.add [@editButton, @previewButton]
bbar.add @designButton if ACS.wcm.Page.canViewDesignMode()
bbar.add @scaffoldingButton if ACS.wcm.Page.canViewScaffoldingMode()
bbar.add @liveCopyStatusButton
bbar.add @clientContextButton if ACS.wcm.Page.canViewClientContext()
bbar.add "-"