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
$.fn.parsley.defaults = { | |
// basic data-api overridable properties here.. | |
inputs: 'input, textarea, select' // Default supported inputs. | |
, excluded: 'input[type=hidden], :disabled' // Do not validate input[type=hidden] & :disabled. | |
, trigger: false // $.Event() that will trigger validation. eg: keyup, change.. | |
, animate: true // fade in / fade out error messages | |
, animateDuration: 300 // fadein/fadout ms time | |
, focus: 'first' // 'fist'|'last'|'none' which error field would have focus first on form validation | |
, validationMinlength: 3 // If trigger validation specified, only if value.length > validationMinlength | |
, successClass: 'has-success' // Class name on each valid input |
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 app = new function() | |
{ | |
// public // | |
// public function | |
this.publicFunction = function(message) | |
{ | |
console.log(message); | |
}; |
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
controller.class.to_s.underscore.gsub("/", "_") |
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
$("input#postnummer").on("keyup", function() { | |
$.get("//postnr.herokuapp.com/city/" + $(this).val(), function(result) { | |
$("input#by").val(result); | |
}); | |
}); |
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
$.fn.editable.defaults.send = "always"; | |
$.fn.editable.defaults.ajaxOptions = { type: 'put' }; | |
$.fn.editable.defaults.params = function(params) | |
{ | |
var data = {}; | |
data[params.name] = params.value; | |
return JSON.stringify(data); | |
}; |
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
<div class="js-google-description"> | |
<label>Meta_description</label> | |
<span class="badge"></span> | |
<textarea name="meta_description"></textarea> | |
</div> |
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
config.paperclip_defaults = { | |
storage: :s3, | |
bucket: "static.example.com", | |
s3_host_alias: "static.example.com", | |
s3_host_name: "s3-eu-west-1.amazonaws.com", # for european bucket | |
url: ":s3_alias_url", | |
path: ":attachment/:id/:style/:basename.:extension", | |
s3_headers: { | |
"Expires" => 10.years.from_now.httpdate | |
}, |
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
$.ajaxSetup( | |
{ | |
contentType: "application/json; charset=utf-8", | |
dataType: "json", | |
headers: { "X-CSRF-Token": $("meta[name='csrf-token']").attr("content") }, | |
type:"POST" | |
}); |
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
$.fn.parsley.defaults = { | |
// basic data-api overridable properties here.. | |
inputs: 'input, textarea, select' // Default supported inputs. | |
, excluded: 'input[type=hidden], :disabled' // Do not validate input[type=hidden] & :disabled. | |
, trigger: false // $.Event() that will trigger validation. eg: keyup, change.. | |
, animate: true // fade in / fade out error messages | |
, animateDuration: 300 // fadein/fadout ms time | |
, focus: 'first' // 'fist'|'last'|'none' which error field would have focus first on form validation | |
, validationMinlength: 3 // If trigger validation specified, only if value.length > validationMinlength | |
, successClass: 'success' // Class name on each valid input |
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 date = new Date(); | |
date.setDate(date.getDate() + 3650); | |
document.cookie = "wide=1;expires=" + date.toUTCString(); |
NewerOlder