This file contains hidden or 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
Change the css property background-position. | |
#logo-link | |
{ | |
width:191px; | |
height:151px; | |
text-decoration:none; | |
display:block; | |
background-image:url(dw-logo-sprite.jpg); | |
background-position:191px 0; |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# | |
# Generate css for the pro glyphicons. | |
# Run this script in the glyphicons_pro/glyphicons/png folder | |
# from the purchased zip file. | |
# | |
# see http://glyphicons.com/ for purchase/license information. | |
# | |
render = (ARGV.include? "--html") ? :html : :css |
This file contains hidden or 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
,init: function() { | |
var me = this; | |
me.control({ | |
'viewport button[action=list-users]': { | |
click: me.showListUsers | |
} | |
... | |
}); |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"> | |
<title>BadMonkey.com - Demo App</title> | |
<script type="text/javascript" src="extjs/ext-all-debug-w-comments.js"></script> | |
<script type="text/javascript"> | |
Ext.onReady(function() { |
This file contains hidden or 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
// Rules for HasOne and BelongsTo Associations in ExtJS | |
// source :http://extjs-tutorials.blogspot.ca/2012/05/extjs-belongsto-association-rules.html | |
// Put the proxy in the model, unless you have a very good reason not to [1] | |
// Always use fully qualified model name | |
// Always set the getterName | |
// Always set the setterName | |
// Always set the associationKey, if the foreign object is returned in the same response as this object | |
// Always set the foreignKey, if you want to load the foreign object at will | |
// Consider changing the instanceName to something shorter | |
// The getter behaves differently depending on whether the foreign object is loaded or not. If it's loaded, the foreign object is returned. Otherwise, you need to pass in a callback to get it. |
This file contains hidden or 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
/** | |
* | |
* Source From SO | |
* http://stackoverflow.com/questions/13095695/extjs-4-0-mvc-add-components-to-a-form-based-on-store | |
* | |
* Create Form Dynamics | |
**/ | |
var myitems = Ext.create('Ext.data.Store', { |
This file contains hidden or 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
Show hidden characters
{ | |
"scope": "source.js -string -comment -constant", | |
"completions": [ | |
{ "trigger": "customtrigger.allowBlank\tBoolean", "contents": "allowBlank: $1${2:,}" }, | |
{ "trigger": "customtrigger.allowOnlyWhitespace\tBoolean", "contents": "allowOnlyWhitespace: $1${2:,}" }, | |
{ "trigger": "customtrigger.blankText\tString", "contents": "blankText: '$1'${2:,}" }, | |
{ "trigger": "customtrigger.checkChangeBuffer\tNumber", "contents": "checkChangeBuffer: $1${2:,}" }, | |
{ "trigger": "customtrigger.checkChangeEvents\tString[]", "contents": "checkChangeEvents: ['$1']${2:,}" }, | |
{ "trigger": "customtrigger.dirtyCls\tString", "contents": "dirtyCls: '$1'${2:,}" }, |
This file contains hidden or 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
// includes bindings for fetching/fetched | |
var PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
typeof(options) != 'undefined' || (options = {}); | |
this.page = 1; | |
typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
}, | |
fetch: function(options) { |
This file contains hidden or 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
// knockout-jquery-ui-widget.js | |
// Copyright (c) 2011, Planapple, Inc. | |
// License: MIT (http://www.opensource.org/licenses/mit-license.php) | |
// | |
// Knockout binding for jQuery UI widgets | |
// | |
// Examples: | |
// <input type="submit" value="OK" data-bind='jqueryui: "button"' /> | |
// | |
// Attaches a jQuery UI button widget to this button, with default options. |
This file contains hidden or 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
ko.bindingHandlers.fileUpload = { | |
update: function(element, valueAccessor, allBindingsAccessor){ | |
var value = ko.utils.unwrapObservable(valueAccessor()) | |
if(element.files.length && value){ | |
var file = element.files[0]; | |
var url = allBindingsAccessor().url | |
xhr = new XMLHttpRequest(); | |
xhr.open("post", url, true); |