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
function playNotification() { | |
$('#notification').playNotification(); | |
} | |
// becomes | |
function playNotification() { | |
$(function() { | |
$("#notification").playNotification(); | |
}); |
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
#wrap | |
+container // using blueprint it gives | |
#content | |
+column(16) // 16 grid units wide column | |
#sidebar | |
+column(8, true) // 8 units wide, true because it's the last column | |
// You can write the SASS and the HTML in the same way, using Compass and the Zen-Coding bundle. Prototyping layouts is super quick :) |
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
=horizontal-form(!width) | |
width = !width | |
input | |
float: left | |
&[type="text"],&[type="select"] | |
width: 70% | |
&[type="submit"] | |
float: right | |
label | |
+clearfix |
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
package | |
{ | |
import com.yahoo.yui.YUIAdapter; | |
import flash.display.Loader; | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.display.Sprite; |
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
<target name="coverage" depends="clean, copy-coverage-so, copy-index-yaml-static"> | |
<tempfile property="coverage.outfile" destDir="/tmp" /> | |
<!-- Temporarily turns off the USE_I18N in settings.py, re-enabled when coverage has completed --> | |
<replace file="${srcdir}/settings.py" token="USE_I18N = False" value="USE_I18N = True" /> | |
<!-- see comments in "test" target --> | |
<exec dir="${srcdir}" executable="python" failonerror="false" resultproperty="coverage.retcode" output="${coverage.outfile}" logError="true"> | |
<env key="UNITTESTS" value="${tests}" /> | |
<env key="PYTHONPATH" value="${test.pythonpath}"/> |
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
$('form.section_edit_form').live('submit', function () { | |
var section_id = $(this).parent().attr('id').split("_")[1]; | |
$.ajax({ | |
url: "/wiki/ajax/section_edit/?section_id=" + section_id, | |
type: "POST", | |
data: $(this).serialize(), | |
success: function(data) { | |
$(this).parent().html(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
$('form.section_edit_form').live('submit', function () { | |
var section_id = $(this).parent().attr('id').split("_")[1]; | |
$.ajax({ | |
url: "/wiki/ajax/section_edit/?section_id=" + section_id, | |
type: "POST", | |
data: $(this).serialize(), | |
success: function(data) { | |
$(this).parent().html(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
$('form.section_edit_form').live('submit', function () { | |
var section_id = $(this).parent().attr('id').split("_")[1]; | |
$.ajax({ | |
url: "/wiki/ajax/section_edit/?section_id=" + section_id, | |
type: "POST", | |
data: $(this).serialize(), | |
success: function(data) { | |
$(this).parent().html(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
$("#id_logo").uploadify({ | |
'uploader' : '{% vurl "/static/script/vendor/uploadify/uploadify.swf" %}', | |
'script' : '{% url business-listing-logo company.key %}', | |
'cancelImg' : '{% vurl "/static/script/vendor/uploadify/cancel.png" %}', | |
'scriptAccess' : 'always', | |
'auto' : true, | |
'queueID' : 'fileQueue', | |
'fileDataName' : 'logo', | |
'sizeLimit' : 1000000, // ah, the old 1mb limit rears its head :( | |
onComplete : function(evt, queueID, file, response) { |
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
// DEFAULT 2.1.0 Code | |
if(jQuery)( | |
function(jQuery){ | |
jQuery.extend(jQuery.fn,{ | |
uploadify:function(options) { | |
jQuery(this).each(function(){ | |
// BAD GLOBAL, BAD, yields "Object does not support this property or method" in IE7/8 | |
settings = jQuery.extend({ | |
// FIXED 2.1.0 Code |
OlderNewer