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
/** | |
* DropKick | |
* | |
* Highly customizable <select> lists | |
* https://github.com/JamieLottering/DropKick | |
* | |
* © 2011 Jamie Lottering <http://github.com/JamieLottering> | |
* <http://twitter.com/JamieLottering> | |
* | |
* changes added from Paritosh Singh <https://github.com/paritosh90/> |
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 defined('C5_EXECUTE') or die(_("Access Denied.")); | |
$hosts = array( | |
'production' => 'production.com', | |
'staging' => 'staging.com', | |
'local' => 'local.dev' | |
); | |
if ($_SERVER['HTTP_HOST'] == $hosts['local']) { | |
define('DB_SERVER', '127.0.0.1'); | |
define('DB_USERNAME', 'root'); | |
define('DB_PASSWORD', ''); |
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
.span6 | |
.dragging.connected{ 'data-slabel' => 'Personal Information' } | |
%h4 | |
= link_to '#', class: 'add-all-fields floatright lightblue-btn tooltip-title', title:'Add All Questions' do | |
= raw '→' | |
= link_to '+', '#add-new-questions', class: 'add-new-question floatright green-btn tooltip-title', title:'Add New Question', role: 'button' | |
Personal Information | |
%span | |
Drag or Double Click to Add | |
= raw '→' |
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 $attr_set = AttributeSet::getByHandle('boat_model_info'); ?> | |
<?php $attr_keys = $attr_set->getAttributeKeys(); ?> | |
<?php foreach($attr_keys as $ak) { ?> | |
<li class="spec-name"><?= $ak->akName ?></li> | |
<li class="spec-value"><?= $c->getAttribute($ak->akHandle) ?></li> | |
<?php } ?> |
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
/* This wordpress config allows for local, staging and production database definitions | |
* Wordpress is in a directory called 'wp', while wp-content is outside the 'wp' | |
* | |
* This also allows for a crazy directory structure: | |
* for example: my staging was http://mydomain.com/clients/sitename/ | |
* but the server http_host variable will only recognize mydomain.com | |
* wordpress still needs to know where my site lives, thus the path variable | |
*/ | |
/* Servers */ |
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
.DS_Store | |
config/site.php | |
files/cache/* | |
files/tmp/* |
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
# hack to not show Chrome's yellow background on autofill form fields | |
if navigator.userAgent.toLowerCase().indexOf("chrome") >= 0 | |
$(window).load -> | |
$('input:-webkit-autofill').each -> | |
$field = $(@) | |
parent = $field.closest '.control-group' | |
text = $field.val() | |
name = $field.attr 'name' | |
$field.after(this.outerHTML).remove() | |
parent.find("input[name='#{name}']").val(text); |
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 PetPhotoUploader | |
# html5 multiple uploader with fallback | |
dom = | |
parent_wrapper: '.controls' # wrapper that contains all parent elements | |
parent: '.file-upload-wrapper' # container/wrapper of the file uploader | |
hidden_upload: '.hidden-upload' # hidden file input | |
file_text: '.file-text' # hidden wrapper notice to user which files they (will) uploaded | |
delete_file: '.delete-upload-file' # link to delete uploaded files | |
uploaded_count = 0 # total files uploaded |
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
.control-group.required.upload-photos | |
= f.label 'Upload files', required: false | |
.controls | |
.file-upload-wrapper | |
= link_to '#', class: 'file-upload red-btn' do | |
%i.icons.upload | |
Upload | |
= f.input :attachment, | |
as: :file, | |
wrapper_html: { class: 'hidden-upload' }, |
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
if @comment.valid? | |
page.insert_html :after, :comment_new, :partial => "comment", :locals => { :comment => @comment } | |
page[dom_id(@comment)].visual_effect :highlight, :duration => 1.5 | |
end | |
page[:shown_notes].value = @comment.commentable.comment_ids.join(',') | |
page[:comment_comment].clear | |
page[:comment_comment].focus |
NewerOlder