View gist:5154692
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
{ | |
"files": | |
{ | |
"fancybox": "https://raw.github.com/cdnjs/cdnjs/master/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js", | |
"font-awesome": "https://raw.github.com/FortAwesome/Font-Awesome/master/css/font-awesome.min.css", | |
"html5shiv": "https://raw.github.com/aFarkas/html5shiv/master/dist/html5shiv.js", | |
"jquery": "http://code.jquery.com/jquery.min.js", | |
"jquery1.8": "http://code.jquery.com/jquery-1.8.3.min.js", | |
"modernizr": "https://raw.github.com/cdnjs/cdnjs/master/ajax/libs/modernizr/2.6.2/modernizr.min.js", | |
"moments": "https://raw.github.com/timrwood/moment/develop/min/moment.min.js", |
View gist:6600712
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
####################################################### | |
# Chocolate Chip Cookies setter+getter | |
####################################################### | |
createCookie = (name, value, expires, path, domain) -> | |
cookie = name + "=" + escape(value) + ";" | |
if expires | |
if expires instanceof Date | |
expires = new Date() if isNaN(expires.getTime()) | |
else | |
expires = new Date(new Date().getTime() + parseInt(expires) * 1000 * 60 * 60 * 24) |
View gist:dfb538acab40f26ca8db
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
dev_mode = true; | |
var log;log=function(e){var t,n,r,i,s,o,u,a;if(dev_mode){try{invalidfunctionthrowanerrorplease()}catch(f){i=f;a=i.stack}s=a.split("\n");o=0;while(o<s.length){s[o]=s[o].replace(/\s+/g," ");++o}t=s[1];n=t.split("@");t=false;u=false;if(n.length===1){n=s[2].split("(");t=false;if(n.length>1){t=n[0].replace("at Object.","");u=n[1].split(":");u=u[2]}else{n[0]=n[0].replace("at ","");n=n[0].split(":");t=n[0]+n[1];u=n[2]}}else{r=n[1].split(":");u=r.pop();n[1]=r.join(":");t=n[0]===""?n[1]:n[0]}console.log(" ");console.warn("%cConsole log: "+t+" (line "+u+")",["display: block","background: #00a9c7","color: white","padding: 10px","text-align: left","font-weight: normal","font-size: 14px","line-height: 35px"].join(";"));console.log(e);console.log({"Full trace:":s});return console.log(" ")}}; |
View gist:28a1101191971aa18987
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
<?php | |
namespace Craft; | |
class FormBuilderPlugin extends BasePlugin | |
{ | |
... | |
View gist:c1268dac2d86e2fb61b1
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
{% extends "_layouts/cp" %} | |
{% set selectedTab = "fields" %} | |
{% import "_includes/forms" as forms %} | |
{% if field is not defined and fieldId is defined %} | |
{% set field = craft.fields.getFieldById(fieldId) %} | |
{% if not field %} | |
{% exit 404 %} |
View gist:dab355a633310d25cd4f
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
<?php | |
namespace Craft; | |
class FormBuilder_FieldsController extends BaseController | |
{ | |
protected $allowAnonymous = true; | |
// SAVE FIELD |
View gist:79bda5f668533ca4c435
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
<?php | |
namespace Craft; | |
class FormBuilder_FieldModel extends BaseComponentModel | |
{ | |
// Properties | |
private $_fieldType; | |
// Public Methods | |
public function __toString() |
View gist:6e92e67364e762d68253
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
<?php | |
namespace Craft; | |
class FormBuilder_FieldRecord extends BaseRecord | |
{ | |
protected $reservedHandleWords = array( | |
'archived', | |
'children', | |
'dateCreated', |
View gist:545ac8eeb2d8450492a9
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
<?php | |
namespace Craft; | |
class FormBuilder_FieldsService extends BaseApplicationComponent | |
{ | |
public $oldFieldColumnPrefix = 'field_'; | |
private $_fieldsById; | |
private $_allFieldsInContext; | |
private $_fieldsByContextAndHandle; |
View gist:e01b49fdb1da3ef23ef2
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
Folder Structure: http://d.pr/i/499f | |
Plugin File - https://gist.github.com/owldesign/28a1101191971aa18987 | |
Template File - https://gist.github.com/owldesign/c1268dac2d86e2fb61b1 | |
Controller: https://gist.github.com/owldesign/dab355a633310d25cd4f | |
Models: https://gist.github.com/owldesign/79bda5f668533ca4c435 | |
Records: https://gist.github.com/owldesign/6e92e67364e762d68253 | |
Services: https://gist.github.com/owldesign/545ac8eeb2d8450492a9 |
OlderNewer