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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#41cac0, 6.5%)", | |
"@brand-success": "rgb(28, 184, 65)", |
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
// Add this to the onRender() of the view you want to add your file upload to | |
// The options passed in will override the default Plupload options | |
// (http://www.plupload.com/documentation.php) | |
this.fileUploadView = new FileUploadView({ | |
el: '#upload-container', | |
url: 'upload.php', | |
successMessage: 'Your file uploaded successfully.' | |
}); | |
this.fileUploadView.render(); |
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
define(function(require) { | |
'use strict'; | |
var _ = require('underscore') | |
return { | |
handleAjaxSuccess: function() { | |
if (_.isFunction(this.closeForm)) { | |
this.closeForm() | |
} |
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
<?php | |
/** | |
* On-the-fly CSS Compression | |
* Copyright (c) 2009 and onwards, Manas Tungare. | |
* Creative Commons Attribution, Share-Alike. | |
* | |
* In order to minimize the number and size of HTTP requests for CSS content, | |
* this script combines multiple CSS files into a single file and compresses | |
* it on-the-fly. | |
* |
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
<?php | |
require dirname(__FILE__) . '/functions.php'; | |
$module = md5('MODULE_NAME'); | |
$page_url = sanitize($_SERVER['PHP_SELF']); | |
if (isset($_POST['firstname'])) | |
require dirname(__FILE__) . '/save.php'; |
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
// Collecting all unique affected app version for a given data set | |
var jsonStats = [ | |
{app_versions: ['1.2','1.2.3']}, | |
{app_versions: null}, | |
{app_versions: ['1.2','1.3']} | |
]; | |
var app_versions = _.uniq(_.flatten(_.compact(_.map(jsonStats, function(day){return day.app_versions })))); | |
// ["1.2", "1.2.3", "1.3"] | |
// Bye bye stupid for loops! |
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
var data = { | |
type: "something", | |
name: "whatever", | |
addresses: [ | |
{ | |
type: "read_address", | |
address: "1/2/3", | |
value: "10" | |
}, | |
{ |