Connects the sortable to a script that can save it via ajax
A Pen by Matthijs Alles on CodePen.
# | |
# If all files excluded and you will include only specific sub-directories | |
# the parent path must matched before. | |
# | |
/** | |
!/.gitignore | |
############################### | |
# Un-ignore the affected subdirectory |
/** | |
* Validates hex value | |
* @param {String} color hex color value | |
* @return {Boolean} | |
*/ | |
function isValidHex(color) { | |
if(!color || typeof color !== 'string') return false; | |
// Validate hex values | |
if(color.substring(0, 1) === '#') color = color.substring(1); |
<!-- Based on https://github.com/dangvanthanh/vue-ckeditor --> | |
<template> | |
<div class="ckeditor"> | |
<textarea :id="id" :value="value"></textarea> | |
</div> | |
</template> | |
<style scoped> | |
.ckeditor { |
array ( | |
'ALL' => 'Albania Lek', | |
'AFN' => 'Afghanistan Afghani', | |
'ARS' => 'Argentina Peso', | |
'AWG' => 'Aruba Guilder', | |
'AUD' => 'Australia Dollar', | |
'AZN' => 'Azerbaijan New Manat', | |
'BSD' => 'Bahamas Dollar', | |
'BBD' => 'Barbados Dollar', | |
'BDT' => 'Bangladeshi taka', |
import parseCsv from 'zipbooks/utils/parse-csv' | |
import { module, test } from 'qunit' | |
module('Unit | Utility | parse-csv', function(_hooks) { | |
test('parses csv successfully', function(assert) { | |
let result = parseCsv('name,age\nadam,31\ntim,32\n"St, clair",26') | |
assert.equal(JSON.stringify(result), '[["name","age"],["adam","31"],["tim","32"],["St, clair","26"]]') | |
}) |
{ | |
"bring back the scaffold to vue files": { | |
"prefix": "scaffold", | |
"body": [ | |
"<template>", | |
" <div>$TM_FILENAME_BASE</div>", | |
"</template>", | |
"", | |
"<script>", | |
"export default {", |
Connects the sortable to a script that can save it via ajax
A Pen by Matthijs Alles on CodePen.
license: gpl-3.0 |
license: gpl-3.0 |
(function() { | |
// Based on article @ http://www.toptal.com/d3-js/towards-reusable-d3-js-charts | |
// Publish a factory method for Chart instances | |
// @usage: | |
// var runningChart = BarChart.instanceOf( {barPadding : 2 } ); | |
// var weatherChart = BarChart.instanceOf() | |
// .fillColor('coral'); | |
window.BarChart = { |