text
stringlengths
2
6.14k
/* name: MapTile.js des: 地图全屏操作 date: 2016-06-02 author: liulin 修改为用js加载 */ ES.MapControl.ESMapFull = ES.Evented.extend({ oOption: { // 加载全屏按钮容器 cSelfDiv: 'ex-map-full', // 父级容器 acParentDivClass: [ 'ex-layout-maptool', 'ex-theme-maptool', 'ex-map-top', 'ex-map-right' ], className: '', title: '地图全屏', }, oUIConfig: { div: { 'class': 'ex-maptool-box ex-map-full', i: {'class': 'ec-icon-expand'}, html: '&nbsp;&nbsp;全屏' } }, // 构造函数 initialize: function (oMapBase, options) { ES.setOptions(this, options); // 获得地图控件 this._oMapBase = oMapBase; this._oMap = oMapBase._oMap; //图层 this._layers = {}; //记录最近一次的div Z-index this._lastZIndex = 0; this._oContainer = $('.' + this.oOption.acParentDivClass.join('.')).eq(0); //var aoLayer = this._oMapBase.getBaseLayers(); // 设置父级容器的事件 this.setParentEvent(); this.initUI(); }, // 设置父级容器的事件 setParentEvent: function () { // 屏蔽事件 //L.DomEvent.addListener(this._oContainer.get(0), 'dblclick', L.DomEvent.stopPropagation); //L.DomEvent.addListener(this._oContainer.get(0), 'mousemove', L.DomEvent.stopPropagation); //L.DomEvent.addListener(this._oContainer.get(0), 'mousewheel', L.DomEvent.stopPropagation); }, //加载工具事件,初始化工具栏 initUI: function () { ES.initTag(this._oContainer, this.oUIConfig); this.initToolEvent(); }, //初始化工具栏事件 initToolEvent: function () { //地图全屏按钮 $('.' + this.oOption.cSelfDiv).bind('click', function () { if (!($.AMUI.fullscreen.isFullscreen)) { $('body').addClass('map_full'); $(this).html('<i class="ec-icon-compress"></i>&nbsp;&nbsp;恢复'); } else { $('body').removeClass('map_full'); $(this).html('<i class="ec-icon-expand"></i>&nbsp;&nbsp;全屏'); } $.AMUI.fullscreen.toggle(); }); }, });
/** * Tom Select v1.7.5 * Licensed under the Apache License, Version 2.0 (the "License"); */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../../tom-select.js')) : typeof define === 'function' && define.amd ? define(['../../tom-select'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TomSelect)); }(this, (function (TomSelect) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var TomSelect__default = /*#__PURE__*/_interopDefaultLegacy(TomSelect); /** * Plugin: "input_autogrow" (Tom Select) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF * ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. * */ TomSelect__default['default'].define('no_backspace_delete', function () { var self = this; var orig_deleteSelection = self.deleteSelection; this.hook('instead', 'deleteSelection', function () { if (self.activeItems.length) { return orig_deleteSelection.apply(self, arguments); } return false; }); }); }))); //# sourceMappingURL=no_backspace_delete.js.map
search_result['213']=["topic_0000000000000068_events--.html","ChatTokenResponseDto Events",""];
'use strict' module.exports = { info: { key: 'javascript', title: 'JavaScript', extname: '.js', default: 'xhr' }, jquery: require('./jquery'), fetch: require('./fetch'), xhr: require('./xhr'), axios: require('./axios') }
function ord (string) { // From: http://phpjs.org/functions // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + improved by: Brett Zamir (http://brett-zamir.me) // + input by: incidence // * example 1: ord('K'); // * returns 1: 75 // * example 2: ord('\uD800\uDC00'); // surrogate pair to create a single Unicode character // * returns 2: 65536 var str = string + '', code = str.charCodeAt(0); if (0xD800 <= code && code <= 0xDBFF) { // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single characters) var hi = code; if (str.length === 1) { return code; // This is just a high surrogate with no following low surrogate, so we return its value; // we could also throw an error as it is not a complete character, but someone may want to know } var low = str.charCodeAt(1); return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; } if (0xDC00 <= code && code <= 0xDFFF) { // Low surrogate return code; // This is just a low surrogate with no preceding high surrogate, so we return its value; // we could also throw an error as it is not a complete character, but someone may want to know } return code; }
export type PhenomicDB = { destroy: () => Promise<*>, put: (sub: string | Array<string>, key: string, value: any) => Promise<*>, get: (sub: string | Array<string>, key: string) => Promise<*>, getPartial: (sub: string | Array<string>, key: string) => Promise<*>, getList: ( sub: string | Array<string>, config: LevelStreamConfig, filter?: string, filterValue: string ) => Promise<*> }; export type PhenomicInputPlugins = { plugins?: Array<(arg: PhenomicInputConfig) => PhenomicPlugin>, presets?: Array<(arg: PhenomicInputConfig) => PhenomicInputPlugins> }; export type PhenomicInputConfig = { path?: string, outdir?: string, port?: number, bundleName?: string, plugins?: Array<(arg: PhenomicInputConfig) => PhenomicPlugin>, presets?: Array<(arg: PhenomicInputConfig) => PhenomicInputPlugins> }; export type PhenomicContentFile = { name: string, fullpath: string // exists: boolean, // type: string }; type PhenomicTransformResult = { data: Object, partial: Object }; type PhenomicHtmlPropsType = { body: React$Element<*>, state?: React$Element<*>, script: React$Element<*> }; type PhenomicHtmlType = (props: PhenomicHtmlPropsType) => React$Element<*>; type PhenomicPluginRenderHTMLType = ( config: PhenomicConfig, props?: { body?: string, state?: Object }, html?: PhenomicHtmlType ) => string; export type PhenomicPlugin = { name: string, // transformer supportedFileTypes?: Array<string>, transform?: ({ config?: PhenomicConfig, file: PhenomicContentFile, contents: Buffer }) => Promise<PhenomicTransformResult> | PhenomicTransformResult, // api define?: (api: express$Application, db: PhenomicDB) => mixed, // collector collect?: (db: PhenomicDB, fileName: string, parsed: Object) => Array<mixed>, // bunder buildForPrerendering?: Function, // renderer getRoutes?: Function, renderServer?: Function, renderHTML?: PhenomicPluginRenderHTMLType, // common addDevServerMiddlewares?: ( config: PhenomicConfig ) => Array<express$Middleware | Promise<express$Middleware>> }; export type PhenomicPlugins = Array<PhenomicPlugin>; export type PhenomicPresets = Array<PhenomicPreset>; export type PhenomicExtensions = PhenomicPreset; export type PhenomicConfig = { path: string, outdir: string, port: number, bundleName: string, plugins: Array<PhenomicPlugin> }; export type PhenomicQueryConfig = { collection?: string, id?: string, after?: string, by?: string, value?: string, limit?: number }; export type PhenomicRoute = { path: string, params?: { [key: string]: any }, component: { getQueries?: (props: { params: { [key: string]: any } }) => { [key: string]: PhenomicQueryConfig } }, collection?: string | PhenomicQueryConfig }; // @todo why this inconsistency? export type PhenomicFetch = | IsomorphicFetch | ((config: PhenomicQueryConfig) => Promise<any>); export type phenomic$Query = string; export type phenomic$Queries = Array<phenomic$Query>;
'use strict'; const assert = require('assert'); const app = require('../../../src/app'); describe('authority service', function() { it('registered the authorities service', () => { assert.ok(app.service('authorities')); }); });
/** * @license Highcharts JS v8.0.2 (2020-03-03) * @module highcharts/modules/sonification * @requires highcharts * * Sonification module * * (c) 2012-2019 Øystein Moseng * * License: www.highcharts.com/license */ 'use strict'; import '../../modules/sonification/sonification.js';
"use strict"; exports.__esModule = true; exports.OTPRequiredError = void 0; var _base = require("./base"); var _includes = _interopRequireDefault(require("lodash/includes")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class OTPRequiredError extends _base.BaseError { static hasError({ headers } = {}) { if (!headers || !headers['otp-token']) { return false; } return (0, _includes.default)(['OPTIONAL', 'REQUIRED'], headers['otp-token'].toUpperCase()); } constructor() { super('otp_required', ...arguments); } } exports.OTPRequiredError = OTPRequiredError;
'use strict'; const gulpMocha = require('gulp-mocha'); module.exports = function (simpleBuild) { const gulp = simpleBuild.gulp; gulp.task('test', ['test:server']); gulp.task('test:watch', ['test:server:watch']); gulp.task('test:server', function () { return gulp.src('./src/server/**/*.spec.js', { read: false }) .pipe(gulpMocha({ reporter: 'spec' })); }); gulp.task('test:server:watch', ['test:server'], function () { gulp.watch('./src/server/**/*.js', ['test:server']); }); };
const EventEmitter = require('events') const stable = require('stable') const glMatrix = require('gl-matrix') const Transform = require('./transform') const AnimatedNumber = require('./animated-number') const AnimatedBoolean = require('./animated-boolean') const Utils = require('./utils') module.exports = class TraceObject extends EventEmitter { constructor () { super() this.parentNode = null this.transform = new Transform() this.opacity = new AnimatedNumber(1) this.enabled = new AnimatedBoolean(true) this.zIndex = new AnimatedNumber(0) this.children = new Set() this.on('connected', () => { for (let i of this.children.values()) i.emit('connected') }) this.on('disconnected', () => { for (let i of this.children.values()) i.emit('disconnected') }) } sortChildren (currentTime, deltaTime) { let values = new Map() for (let i of this.children.values()) { values.set(i, [i.zIndex.getValue(currentTime, deltaTime), i.enabled.getValue(currentTime, deltaTime)]) } let sortedChildren = stable([...values.keys()], (a, b) => { return values.get(a)[0] > values.get(b)[0] }) return { values, children: sortedChildren } } drawChildren (ctx, transform, currentTime, deltaTime) { let {values, children} = this.sortChildren(currentTime, deltaTime) for (let node of children) { if (values.get(node)[1] === true) { Utils.resetCtx(ctx) node.draw(ctx, transform, currentTime, deltaTime) } } } draw (ctx, parentTransform, currentTime, deltaTime) { let rawTransform = this.transform.getMatrix(currentTime, deltaTime) let transform = glMatrix.mat4.create() glMatrix.mat4.multiply(transform, parentTransform, rawTransform) this.drawSelf(ctx, transform, currentTime, deltaTime) this.drawChildren(ctx, transform, currentTime, deltaTime) } drawSelf (ctx, transform, currentTime, deltaTime) {} addChild (...childNodes) { for (let childNode of childNodes) { if (childNode.parentNode !== null && childNode.parentNode !== this) { throw new Error('Child node already has a parent') } this.children.add(childNode) childNode.parentNode = this childNode.emit('connected') } } removeChild (...childNodes) { let removed = [] for (let childNode of childNodes) { if (childNode.parentNode !== this) { throw new Error('Not a child node of this object') } childNode.emit('disconnected') childNode.parentNode = null removed.push(this.children.delete(childNode)) } return removed.length === 1 ? removed[0] : removed } hasChild (childNode) { return this.children.has(childNode) } closest (fn) { if (fn(this)) return this if (this.parentNode) return this.parentNode.closest(fn) return null } addKeys (props) { for (let prop in props) { let property = this for (let key of prop.split('.')) { property = property[key] if (!property) break } if (!property) { console.warn('property not found: ' + prop) continue } let val = props[prop] let didWarn = false if (typeof val === 'object') { for (let time in val) { if (!time.match(/^[+-]?(?:\d+?(?:\.\d+?)?|\.\d+?)?$/)) { this.addKeys({ [`${prop}.${time}`]: val[time] }) continue } let t = parseFloat(time) let v = val[time] if (!Array.isArray(v)) v = [v] if (property.addKey) property.addKey(t, ...v) else if (!didWarn) { console.warn(prop + ' has no addKey method') didWarn = true } } } else { property.defaultValue = val } } } }
$(function() { var select = $( "#minbeds" ); var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({ min: 1, max: 4, range: "min", value: select[ 0 ].selectedIndex + 1, slide: function( event, ui ) { select[ 0 ].selectedIndex = ui.value - 1; } }); $( "#minbeds" ).change(function() { slider.slider( "value", this.selectedIndex + 1 ); }); });
angular.module('app.controllers.kda', ['app.services.data', 'app.services.options']) .controller('KdaController', ['$scope', 'Data', 'Options', function ($scope, Data, Options) { console.log('kda chart controller', $scope) Data.data.getKdaData($scope); $scope.$watch('kills + deaths + assists', function() { if($scope.kills && $scope.deaths && $scope.assists) { $scope.chart = [ { value: $scope.kills, color: "rgba(22,79,16,1)" }, { value : $scope.deaths, color : "rgba(189,16,13,1)" }, { value: $scope.assists, color: "rgba(88,156,173,1)" } ]; } }) $scope.options = Options.kdaOptions }])
var elements = document.getElementsByTagName('script') Array.prototype.forEach.call(elements, function(element) { if (element.type.indexOf('math/tex') != -1) { // Extract math markdown var textToRender = element.innerText || element.textContent; // Create span for KaTeX var katexElement = document.createElement('span'); katexElement.style = "text-align:center"; // Support inline and display math if (element.type.indexOf('mode=display') != -1){ katexElement.className += "math-display"; textToRender = '\\displaystyle {' + textToRender + '}'; } else { katexElement.className += "math-inline"; } katex.render(textToRender, katexElement); element.parentNode.insertBefore(katexElement, element); } });
$(function () { $('div').browser(); });
'use strict'; import assert from 'assert'; import bot from '../bot.js'; import * as interval from '../interval.js'; import FakeClient from './util/fakeclient.js'; import FakeMessage from './util/fakemessage.js'; describe('./bot.js', () => { let client; beforeEach(() => { interval.enableTestMode(); client = bot(new FakeClient()); client.emit('ready'); }); afterEach(() => { client.emit('disconnected'); interval.disableTestMode(); }); it('help doesn\'t fail', () => { const message = new FakeMessage('!help'); client.emit('message', message); assert.equal(message.replies.length, 1); }); it('ping works', () => { const message = new FakeMessage('!ping'); client.emit('message', message); assert.equal(message.replies.length, 1); assert.equal(message.replies[0], 'pong'); }); });
/** * Created by 勇 on 2015/7/3. */
Noted.ItemView = Ember.View.extend({ templateName: "item_static", didInsertElement: function() { if (this.listItem.get("isEditing") === true) { this._toEditingView(); } else if (this.get("listItem.isActive")) { this._updateScrollPosition(); } }, editingObserver: function() { if (this.listItem.get("isEditing")) { this._toEditingView(); } else { this.set("templateName", "item_static"); this.rerender(); } }.observes("listItem.isEditing"), activeObserver: function() { if (this.get('listItem.isActive')) { this._updateScrollPosition(); } else { if (this.get("listItem.isEditing")) { this.set("listItem.isEditing", false); } } }.observes('listItem.isActive'), click: function(e) { if (this.get("listItem.isEditing")) { if ($(e.target).prop("tagName") != "TEXTAREA") { this.set('listItem.isEditing', false); } } else { this.set('parentView.active', this.get('listItem')); } }, focusOut: function(e) { if (!this.get("listItem.isCanceling")) { var value = this.get("listItem.text"); if(/^\s+$/.test(value) || value === "") { this.get('controller').deleteItem(this.get('listItem')); this.get("parentView")._changeActiveByOffset(-1); } else { this.set('listItem.isEditing', false); this.set('listItem.text', value); } Noted.store.commit(); } else { if (this.get("oldValue") === "") { this.get('controller').deleteItem(this.get('listItem')); this.get("parentView")._changeActiveByOffset(-1); }; this.set("listItem.isEditing", false); this.set("listItem.isCanceling", false); } }, doubleClick: function() { // make de-selectable so that a triple click will not select this.listItem.set("isEditing", true); }, _toEditingView: function() { this.set("templateName", "item_editing"); this.rerender(); this.didInsertElement = function() { this.$("textarea").focus(); this.$("textarea").height(this.$("textarea").prop("scrollHeight")); }; }, _updateScrollPosition: function() { var activeView = this.$(); var container = $(".body-pane .scroller"); // don't like how hard coded this is - alternatives? var viewportTop = $(container).scrollTop(); var viewportBottom = viewportTop + $(container).height(); var activeTop = $(activeView).position().top; var activeBottom = activeTop + $(activeView).height(); var offset; if (viewportTop > activeTop) { offset = viewportTop - activeTop; $(container).scrollTop($(container).scrollTop() - offset); } else if (viewportBottom < activeBottom) { offset = activeBottom - viewportBottom; $(container).scrollTop($(container).scrollTop() + offset); } } }); Noted.ItemTextArea = Ember.TextArea.extend({ old: undefined, cancel: false, didInsertElement: function() { this._super(); this.resize(); this.$().bind('paste', function(e) { // workaround: paste actually fires BEFORE the text has been pasted in setTimeout(function() {this.resize();}.bind(this), 0); }.bind(this)); this.old = this.$().val(); this.set("parentView.oldValue", this.old); }, willDestroyElement: function() { this._super(); this.$().unbind('paste'); if (this.get("item.isCanceling")) { this.set("value", this.old); } }, keyDown: function() { this._super(); // wait for letter to be inserted before measuring resize setTimeout(function () { // checks to make sure the element still exists - i.e. ignore esc/enter if (this.$()) this.resize(); }.bind(this), 0) }, resize: function() { var textarea = this.$(); textarea.height(textarea.prop('scrollHeight')); } });
module("funcunit - jQuery API",{ setup: function() { S.open("//funcunit/test/confirm.html") } }) test("confirm overridden", function(){ S('#confirm').click().wait(1000, function(){ equal(S('#confirm').text(), "I was confirmed", "confirmed overriden to return true"); }); }); test("alert overridden", function(){ S('#alert').click().wait(1000, function(){ equal(S('#alert').text(), "I was alert", "alert overriden to return true"); }); });
let express = require('express'); let config = require('./config/main'); let path = require('path'); // providing route prefixing for express Router express.application.prefix = express.Router.prefix = function (path, configure) { let router = express.Router(); this.use(path, router); configure(router); return router; }; let app = express(); let mongodbURL; // Get env args let port_string = process.argv[2]; let env_value = process.argv[3]; if (typeof port_string !== "undefined" && port_string.length > 0) { console.log("port string: " + port_string); config.port_number = port_string; } // Default env value is DEV if (typeof env_value === "undefined") { console.log("env_value is not set , Default env is DEV"); env_value = "DEV"; } switch (env_value) { case "DEV": mongodbURL = config.localDB.connection; console.log("environment = " + mongodbURL); break; case "PROD": mongodbURL = config.db.connection; console.log("environment = " + mongodbURL); break; default: console.log("env_value is not correct: " + env_value); return -1; } // Set the public folder app.set('public', path.join(__dirname, 'public')); app.set("config",config); app.set("mongoUrl", mongodbURL); require('./boot/boot')(app);
import React, { Fragment } from 'react' import noop from '@utils/noop' const DEFAULT_TAB = { id: 'blank', onClick: noop, renderTab: () => <div />, renderContents: () => <div />, } const TabSet = ({ activeTabId, buttons, onTabClicked = noop, showTabs = true, tabs = [] }) => { if (tabs.length === 0) tabs.push(DEFAULT_TAB) const activeId = activeTabId || tabs[0].id const activeTab = tabs.find(tab => tab.id === activeId) || tabs[0] const className = [ 'tab-set', !showTabs ? 'no-tabs' : '', ].filter(Boolean).join(' ') return ( <div className={className}> {showTabs && <Fragment> <ul className={`tabs ${activeTabId}`}> {tabs.map((tab) => { // eslint-disable-next-line no-param-reassign if (!tab.onClick) tab.onClick = () => onTabClicked(tab.id) const liClassName = [ 'tab', tab.className, tab.id, activeTab.id === tab.id && 'is-active', ].filter(Boolean).join(' ') return <li key={tab.id} className={liClassName} onClick={tab.onClick}>{tab.tab}</li> })} <li className="buttons">{buttons}</li> </ul> </Fragment> } <div className="tab-contents"> {activeTab.contents} </div> </div> ) } TabSet.displayName = 'TabSet' export default TabSet
(function () { 'use strict'; angular .module('app.hotels') .controller('HotelsController', HotelsController); /* @ngInject */ function HotelsController($q, hotelService, logger) { /*jshint validthis: true */ var vm = this; vm.title = 'Hotels'; vm.categories = []; activate(); function activate() { var promises = [ /* * We get the first set of categories * In a real application we would need to perform paging here */ getHotelCategories({from: 0, to:3}), ]; return $q.all(promises).then(function() { logger.info('Activated Hotels View'); }); } function getHotelCategories(indices) { return hotelService.getHotelCategories(indices) .subscribe(categories => { vm.categories = categories; return vm.categories; }); } } })();
export default [ // Forsaken Thicket {id: 'vale_guardian', raid: 'Forsaken Thicket', wing: 'Spirit Vale', name: 'Vale Guardian', type: 'Boss'}, {id: 'spirit_woods', raid: 'Forsaken Thicket', wing: 'Spirit Vale', name: 'Spirit Woods', type: 'Checkpoint'}, {id: 'gorseval', raid: 'Forsaken Thicket', wing: 'Spirit Vale', name: 'Gorseval', type: 'Boss'}, {id: 'sabetha', raid: 'Forsaken Thicket', wing: 'Spirit Vale', name: 'Sabetha', type: 'Boss'}, {id: 'slothasor', raid: 'Forsaken Thicket', wing: 'Salvation Pass', name: 'Slothasor', type: 'Boss'}, {id: 'bandit_trio', raid: 'Forsaken Thicket', wing: 'Salvation Pass', name: 'Bandit Trio', type: 'Boss'}, {id: 'matthias', raid: 'Forsaken Thicket', wing: 'Salvation Pass', name: 'Matthias', type: 'Boss'}, {id: 'escort', raid: 'Forsaken Thicket', wing: 'Stronghold of the Faithful', name: 'Escort', type: 'Boss'}, {id: 'keep_construct', raid: 'Forsaken Thicket', wing: 'Stronghold of the Faithful', name: 'Keep Construct', type: 'Boss'}, {id: 'twisted_castle', raid: 'Forsaken Thicket', wing: 'Stronghold of the Faithful', name: 'Twisted Castle', type: 'Checkpoint'}, {id: 'xera', raid: 'Forsaken Thicket', wing: 'Stronghold of the Faithful', name: 'Xera', type: 'Boss'}, // Bastion of the Penitent {id: 'cairn', raid: 'Bastion of the Penitent', wing: 'Bastion of the Penitent', name: 'Cairn', type: 'Boss'}, {id: 'mursaat_overseer', raid: 'Bastion of the Penitent', wing: 'Bastion of the Penitent', name: 'Mursaat Overseer', type: 'Boss'}, {id: 'samarog', raid: 'Bastion of the Penitent', wing: 'Bastion of the Penitent', name: 'Samarog', type: 'Boss'}, {id: 'deimos', raid: 'Bastion of the Penitent', wing: 'Bastion of the Penitent', name: 'Deimos', type: 'Boss'}, // Hall of Chains {id: 'soulless_horror', raid: 'Hall of Chains', wing: 'Hall of Chains', name: 'Soulless Horror', type: 'Boss'}, {id: 'river_of_souls', raid: 'Hall of Chains', wing: 'Hall of Chains', name: 'River of Souls', type: 'Boss'}, {id: 'statues_of_grenth', raid: 'Hall of Chains', wing: 'Hall of Chains', name: 'Statues of Grenth', type: 'Boss'}, {id: 'voice_in_the_void', raid: 'Hall of Chains', wing: 'Hall of Chains', name: 'Voice in the Void', type: 'Boss'}, // Mythwright Gambit {id: 'conjured_amalgamate', raid: 'Mythwright Gambit', wing: 'Mythwright Gambit', name: 'Conjured Amalgamate', type: 'Boss'}, {id: 'twin_largos', raid: 'Mythwright Gambit', wing: 'Mythwright Gambit', name: 'Twin Largos', type: 'Boss'}, {id: 'qadim', raid: 'Mythwright Gambit', wing: 'Mythwright Gambit', name: 'Qadim', type: 'Boss'}, // The Key of Ahdashim {id: 'gate', raid: 'The Key of Ahdashim', wing: 'The Key of Ahdashim', name: 'Gate', type: 'Checkpoint'}, {id: 'adina', raid: 'The Key of Ahdashim', wing: 'The Key of Ahdashim', name: 'Cardinal Adina', type: 'Boss'}, {id: 'sabir', raid: 'The Key of Ahdashim', wing: 'The Key of Ahdashim', name: 'Cardinal Sabir', type: 'Boss'}, {id: 'qadim_the_peerless', raid: 'The Key of Ahdashim', wing: 'The Key of Ahdashim', name: 'Qadim the Peerless', type: 'Boss'} ]
'use strict' const {Product, Review, User, Category, Tag, Order, Address, LineItem} = require('APP/db') const Promise = require('bluebird') const {assertAdminOrSelfForOrder, mustBeLoggedIn} = require('APP/server/auth.filters.js') module.exports = require('express').Router() // fetch all of the orders for admin order list view, make sure the user requesting this is an admin .param('id', (req, res, next, id) => { Order.findById(id, { include: [{model: User, include: [{model: Address}]}, {model: LineItem}]}) .then(order => { // if no order send 404 req.order = order next() }) .catch(next) }) .get('/', (req, res, next) => { Order.findAll({include: [{model: User}]}) .then(orders => res.json(orders)) .catch(next) }) // get a single order to display on the admin single order view and user single order view .get('/:id', (req, res, next) => { // res.json(order) // if allowed Order.findById(req.params.id, { include: [{model: LineItem, include: {model: Product}}, {model: User, include: [{model: Address}]}]}) .then(order => res.json(order)) .catch(next) }) // update the status of the order .put('/:id', assertAdminOrSelfForOrder, (req, res, next) => { req.order.update(req.body) .then(updatedOrder => res.json(updatedOrder)) // Order.update(req.body, {where: {id: req.params.id}}) // .then(([count, order]) => res.json(order)) .catch(next) })
export const description = 'Deploys project' export const run = () => () => console.log('deploying')
/** * socket.io application object & request wrapper * * The first few requests when hitting the site will be pre-cached, as the socket won't * have had time to connect yet. Socket.io already does this, but we want to fallback to * AJAX instead of waiting however long for a socket to become available. If there's no * response from the socket server in a given time then AJAX will be run to load the initial * page content instead. * * This kind of mechanism should respond better under high load (if/when open socket connections * limits start to become a problem). It also allows us to easily disable the socket server * if we're experiencing any unforseen load issues. * * @package StopTheSpies Website * @author Sam Pospischil <pospi@spadgos.com> * @since 2014-08-24 */ window.io || (io = {}); (function($, io) { var __CONNECTED__ = false, __LOADING__ = setTimeout(runBufferedRequests, STS.options.SOCKET_CONNECT_TIMEOUT), PRE_LOAD_CALLS = [], START = new Date(); function runBufferedRequests() { clearTimeout(__LOADING__); __LOADING__ = false; if (!PRE_LOAD_CALLS.length) { return; } for (var i = 0, l = PRE_LOAD_CALLS.length; i < l; ++i) { STS.app.api.apply(PRE_LOAD_CALLS[i][0], PRE_LOAD_CALLS[i][1]); } PRE_LOAD_CALLS = []; } /* if (STS.options.ENABLE_REALTIME) { var opts = undefined; if (STS.options.API_SOCKET_BASEURL) { opts = { resource : STS.options.API_SOCKET_BASEURL }; } io = io.connect(STS.options.API_BASE_URL, opts); io.on('connect', function() { __CONNECTED__ = true; runBufferedRequests(); }); io.on('disconnect', function() { __CONNECTED__ = false; }); //---------------------------------------------------------------------------- io.on('stats:update', function(stats) { STS.events.onStatsUpdate(stats); }); io.on('shares:update', function(shares) { STS.events.onSharesLoad(shares); }); io.on('tweets:updateCount', function(count) { $('.tweets-support-total').numberSpinner('set', count); }); io.on('l:views', function(reps) { STS.events.onLegislatorStatsIncrement(reps, 'views'); notifyLegislatorMap(reps, 'views'); }); io.on('l:calls', function(reps) { STS.events.onLegislatorStatsIncrement(reps, 'calls'); notifyLegislatorMap(reps, 'calls'); }); io.on('l:emails', function(reps) { STS.events.onLegislatorStatsIncrement(reps, 'emails'); notifyLegislatorMap(reps, 'emails'); }); io.on('l:tweets', function(reps) { STS.events.onLegislatorStatsIncrement(reps, 'tweets'); notifyLegislatorMap(reps, 'tweets'); }); io.on('l:facebooks', function(reps) { STS.events.onLegislatorStatsIncrement(reps, 'facebooks'); notifyLegislatorMap(reps, 'facebooks'); }); } */ //---------------------------------------------------------------------------- // reusable event handlers function notifyLegislatorMap(reps, event) { var colors = STS.CampaignMap.EVENT_COLORS; var color = colors[event], count, ward, rep; for (rep in reps) { if (!reps.hasOwnProperty(rep)) continue; for (var i = 0, l = STS.TOTAL_MAPS_COUNT; i < l; ++i) { ward = STS.CampaignMap.getWardForMember(i, rep); if (!ward) { continue; // senators :TODO: show some other way } count = reps[rep]; STS.anim.map.notifyElectorate(ward, color, count); } } } window._testMapPing = notifyLegislatorMap; //---------------------------------------------------------------------------- // EXPORTS STS.app = io; STS.app.api = function(ioEvent, ajaxUrl, data, onComplete, onError) { data || (data = {}); if (!__CONNECTED__ && __LOADING__) { PRE_LOAD_CALLS.push([this, arguments]); return; } if (__CONNECTED__ && ioEvent) { io.emit(ioEvent, data, onComplete); } else if (ajaxUrl) { var method = "GET"; if (ajaxUrl.url) { method = ajaxUrl.method; ajaxUrl = ajaxUrl.url; } $.ajax(ajaxUrl, { method: method, data: data, success: onComplete || function() {}, error: onError || function() {}, cache : true // :NOTE: we'll always cache AJAX requests, and never cache socket ones. If the socket server is having issues then stale info is probably better to avoid load. }); } }; })(jQuery, io);
#!/usr/bin/env node var _ = require('underscore'); var app = require('./package.json'); var opts = require('commander'); var path = require('path'); var utils = require('./utils'); // globals for keeping track of walked files/dirs var dirs = []; var files = []; // There are only two options: encrypt, and decrypt. // // Note: // e.g. .option('FLAG, EXPANDED_FLAG|OPTION_NAME', 'DEFAULT|DESCRIPTION') opts .version( app.version ) .usage('[options]') .option('-e, --encrypt', 'the option to encrypt files') .option('-d, --decrypt', 'the option to decrypt files') .parse(process.argv); // ensure notes, encrypted, and tmp directories exist if (!utils.directoryExists('./notes')) { utils.createDirectory('./notes'); } if (!utils.directoryExists('./encrypted')) { utils.createDirectory('./encrypted'); } if (!utils.directoryExists('/tmp/notes')) { utils.createDirectory('/tmp/notes'); } if (!utils.directoryExists('/tmp/encrypted')) { utils.createDirectory('/tmp/encrypted'); } /** * Creates a file based on given parameters * * @param {String} root * @param {Object} stat * @param {function} next */ var walkFileCallback = function(root, stat, next) { var filePath = path.join(root, stat.name); files.push(filePath); next(); }; /** * Creates a directory based on given parameters * * @param {String} root * @param {Object} stat * @param {function} next */ var walkDirCallback = function(root, stat, next) { var dirPath = path.join(root, stat.name); dirs.push(dirPath); next(); }; /** * Reports error and exits * * @param {String} root * @param {Object} stats * @param {function} next */ var walkErrorCallback = function(root, stats, next) { console.log('walk error!'); process.exit(1); // next(); }; if (opts.encrypt) { // locally backup encrypted dir before we try to encrypt utils.copyDirectory('./encrypted', '/tmp/encrypted', function(err) { // catch any copying error if (err) { console.log('error creating local backup!'); process.exit(1); } utils.promptForPassword(function(err, result) { if (err) { console.log('problem with password prompt'); } // walk notes dir utils.walk('./notes', walkFileCallback, walkDirCallback, walkErrorCallback, function doneCallback() { // create dirs _.each(dirs, function(dir) { var destination = path.join('./encrypted', utils.stripLeadingDirectory(dir)); try { utils.createDirectory(destination); } catch(e) { if (e.code !== 'EEXIST') { process.exit(1); } } }); // read note files, encrypt them, and save them in the destination dir _.each(files, function(file) { var destination = path.join('./encrypted', utils.stripLeadingDirectory(file)); var data = utils.getFile(file); utils.saveEncryptedFile(data, destination, result.password); }); }); }); }); } else if (opts.decrypt) { // locally backup notes dir before we try to decrypt utils.copyDirectory('./notes', '/tmp/notes', function(err) { if (err) { console.log('error creating local backup!'); process.exit(1); } utils.promptForPassword(function(err, result) { if (err) { console.log('problem with password prompt'); } // walk encrypted dir utils.walk('./encrypted', walkFileCallback, walkDirCallback, walkErrorCallback, function doneCallback() { // create dirs _.each(dirs, function(dir) { var destination = path.join('./notes', utils.stripLeadingDirectory(dir)); try { utils.createDirectory(destination); } catch(e) { // if the directory exists, skip over the error. Otherwise exit. if (e.code !== 'EEXIST') { process.exit(1); } } }); // read note files, decrypt them, and save them in the destination dir _.each(files, function(file) { var destination = path.join('./notes', utils.stripLeadingDirectory(file)); var data = utils.getEncryptedFile(file, result.password); utils.saveFile(data, destination); }); }); }); }); } else { // report error console.log('error, no option chosen'); }
System.register(["./departementsiglename"], function (_export) { var DepartementSigleNameItem, _createClass, _get, _inherits, _classCallCheck, Groupe; return { setters: [function (_departementsiglename) { DepartementSigleNameItem = _departementsiglename.DepartementSigleNameItem; }], execute: function () { "use strict"; _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; // Groupe = _export("Groupe", (function (_DepartementSigleNameItem) { function Groupe(oMap) { _classCallCheck(this, Groupe); _get(Object.getPrototypeOf(Groupe.prototype), "constructor", this).call(this, oMap); } _inherits(Groupe, _DepartementSigleNameItem); _createClass(Groupe, { type: { get: function () { return "groupe"; } }, collection_name: { get: function () { return "groupes"; } } }); return Groupe; })(DepartementSigleNameItem)); } }; }); // groupe.js // // class Groupe //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRhdGEvZG9tYWluL2dyb3VwZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO1FBR0ksd0JBQXdCLGtEQUlmLE1BQU07Ozs7QUFKZixvQ0FBd0IseUJBQXhCLHdCQUF3Qjs7Ozs7Ozs7Ozs7Ozs7QUFJZixrQkFBTTtBQUNKLHlCQURGLE1BQU0sQ0FDSCxJQUFJLEVBQUU7MENBRFQsTUFBTTs7QUFFWCwrQ0FGSyxNQUFNLDZDQUVMLElBQUksRUFBRTtpQkFDZjs7MEJBSFEsTUFBTTs7NkJBQU4sTUFBTTtBQUlYLHdCQUFJOzZCQUFBLFlBQUc7QUFDUCxtQ0FBTyxRQUFRLENBQUM7eUJBQ25COztBQUNHLG1DQUFlOzZCQUFBLFlBQUc7QUFDbEIsbUNBQU8sU0FBUyxDQUFDO3lCQUNwQjs7Ozt1QkFUUSxNQUFNO2VBQVMsd0JBQXdCIiwiZmlsZSI6ImRhdGEvZG9tYWluL2dyb3VwZS5qcyIsInNvdXJjZVJvb3QiOiIvc3JjLyJ9
import './chunk-1fafdf15.js'; import { merge } from './helpers.js'; import { V as VueInstance } from './chunk-bd4264c6.js'; import { r as registerComponent, a as registerComponentProgrammatic, u as use } from './chunk-cca88db8.js'; import './chunk-b9bdb0e4.js'; import { L as Loading } from './chunk-1d4d79a1.js'; export { L as BLoading } from './chunk-1d4d79a1.js'; var localVueInstance; var LoadingProgrammatic = { open: function open(params) { var defaultParam = { programmatic: true }; var propsData = merge(defaultParam, params); var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : localVueInstance || VueInstance; var LoadingComponent = vm.extend(Loading); return new LoadingComponent({ el: document.createElement('div'), propsData: propsData }); } }; var Plugin = { install: function install(Vue) { localVueInstance = Vue; registerComponent(Vue, Loading); registerComponentProgrammatic(Vue, 'loading', LoadingProgrammatic); } }; use(Plugin); export default Plugin; export { LoadingProgrammatic };
var ui = (function () { function buildOnlineUsersList(users) { var div = '<h1>Online users</h1>' var ul = '<ul id="online-users">'; for (var i = users.length - 1; i >= 0; i--) { var li = $('<li class = "online-user" data-username=' + users[i].username + '/>'); li.text(users[i].username); li.prepend('<img src="' + users[i].profilePicture + '" width="30" height = "50" />'); if (users[i].messagesState) { li.addClass("unread"); } ul +=li[0].outerHTML; } ul += '</ul>'; div += ul; //div += '</div>'; return div; } function buildMessages(users) { var div = ''; div += '<form id="form-send-message">' + '<input type = "text" name="content" autofocus/>' + '</form>'; //div += '<form id="sendFileForm" enctype="multipart/form-data">' + // '<input name="file" type="file" />' + // '<input type="submit" id="UploadFile" value="Upload" />' + // '</form>'; var ul = '<ul id="user-messages">'; for (var i = users.length - 1; i >= 0; i--) { var li; if (users[i].content) { li = appendRecievedMessage(users[i].content, users[i].sender.username); } else { li = appendRecievedFile(users[i].filePath, users[i].sender.username); } ul += li; } ul += '</ul>'; div += ul div += '<form id="sendFileForm" enctype="multipart/form-data">' + '<input name="file" type="file" id="chooseFile" /><br/>' + '<input type="submit" id="UploadFile" value="Upload" />' + '</form>'; //div += '</div>'; return div; } function appendRecievedMessage(messageContent, senderUsername) { var li = '<li class = "message">'; li += '<div><h2>' + senderUsername + ': '; // Adding colors to the messages if (localStorage.getItem("username") == senderUsername) { li += '<span class="blue-message">'; } else { li += '<span class="red-message">'; } li += messageContent + '</span>' + '</h2></div>'; li += '</li>'; return li; //var li = '<li class = "message">'; //li += '<div><h2>Sender: ' + senderUsername + '</h2></div>'; //li += '<div class="message-content"><h2>Message: ' + messageContent + '</h2></div>'; //li += '</li>'; //return li; } function appendRecievedFile(messageContent, senderUsername) { var li = '<li class = "message">'; li += '<h2>' + senderUsername ; li += ': <a href ="' + messageContent + '">CLICK ME</a></h2>'; li += '</li>'; return li; } function getProfileInfo(username) { var div = ''; div += '<h2>' + username + '</h2>'; div += '<img id= "profile-picture" src = "" width= "70" height = "50"/>'; return div; } return { buildOnlineUsersList: buildOnlineUsersList, buildMessages: buildMessages, appendRecievedMessage: appendRecievedMessage, getProfileInfo: getProfileInfo, appendRecievedFile: appendRecievedFile }; }());
/* @flow */ import { bindActionCreators } from 'redux'; import React from 'react'; import Select from 'react-select'; import { connect } from 'react-redux'; import {map} from 'lodash'; import { getAllBoards } from '../../data/boards'; import {addView} from '../../actions/views'; import {container, form, formLabel, formInput, formSelect, primaryButton} from './vieweditor.css'; import { switchPageToSearch } from '../../actions/page'; import type { Board} from '../../interfaces/trello'; import type { View } from '../../interfaces/view'; import 'react-select/dist/react-select.css?global=true'; type boardOption = { value: string, label: string, }; export class ViewEditor extends React.Component { state: { name: string, selectedBoards: string[], }; updateName(name: string) { this.setState({name}); } constructor(props: any) { super(props); this.state = { name: '', selectedBoards: [], }; } buildView() { let {addView: _addView, switchPageToSearch: _switchViewToSearch} = this.props; let {name, selectedBoards} = this.state; let newView: View = { name, sources: { boards: selectedBoards, } }; _addView(newView); _switchViewToSearch(); } selectBoards(boardIds: boardOption[]) { this.setState({ selectedBoards: map(boardIds, option => option.value), }); } render() { let boards: Board = this.props.boards; let boardOptions = map(boards, board => ({value: board.id, label: board.name})); let {name, selectedBoards} = this.state; return (<div className={container}> <h2> Create a new View </h2> <div className={form}> <label htmlFor="view-name" className={formLabel}>View Name</label> <input id="view-name" defaultValue={name} className={formInput} onChange={e => this.updateName(e.target.value)} /> <label htmlFor="view-boards" className={formLabel}>Boards To Pull Cards From</label> <Select id="view-boards" className={formSelect} options={boardOptions} value={selectedBoards} onChange={selectedIds => this.selectBoards(selectedIds)} multi={true} /> <span className={primaryButton} onClick={() => this.buildView()}> Create View </span> </div> </div>); } } ViewEditor.propTypes = { boards: React.PropTypes.array.isRequired, addView: React.PropTypes.func.isRequired, switchPageToSearch: React.PropTypes.func.isRequired, }; const mapStateToProps = (state) => ({ boards: getAllBoards(state), }); const mapDispatchToProps = (dispatch) => bindActionCreators({ addView, switchPageToSearch, }, dispatch); export const ViewEditorContainer = connect(mapStateToProps, mapDispatchToProps)(ViewEditor);
var gulp = require('gulp'); var runSequence = require('run-sequence'); var to5 = require('gulp-babel'); var plumber = require('gulp-plumber'); var sourcemaps = require('gulp-sourcemaps'); var sass = require('gulp-sass'); var notify = require('gulp-notify'); var paths = require('../paths'); var compilerOptions = require('../babel-options'); var assign = Object.assign || require('object.assign'); gulp.task('build-html-es6', function () { return gulp.src(paths.html) .pipe(gulp.dest(paths.output + 'es6')); }); gulp.task('build-es6', ['build-html-es6'], function () { return gulp.src(paths.source) .pipe(gulp.dest(paths.output + 'es6')); }); gulp.task('build-html-commonjs', function () { return gulp.src(paths.html) .pipe(gulp.dest(paths.output + 'commonjs')); }); gulp.task('build-commonjs', ['build-html-commonjs'], function () { return gulp.src(paths.source) .pipe(to5(assign({}, compilerOptions, {modules:'common'}))) .pipe(gulp.dest(paths.output + 'commonjs')); }); gulp.task('build-html-amd', function () { return gulp.src(paths.html) .pipe(gulp.dest(paths.output + 'amd')); }); gulp.task('build-amd', ['build-html-amd'], function () { return gulp.src(paths.source) .pipe(to5(assign({}, compilerOptions, {modules:'amd'}))) .pipe(gulp.dest(paths.output + 'amd')); }); gulp.task('build-html-system', function () { return gulp.src(paths.html) .pipe(gulp.dest(paths.output + 'system')); }); gulp.task('build-system', ['build-html-system'], function () { return gulp.src(paths.source) .pipe(to5(assign({}, compilerOptions, {modules:'system'}))) .pipe(gulp.dest(paths.output + 'system')); }); gulp.task('build-css', function() { return gulp.src(paths.css) .pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') })) .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(sourcemaps.write()) .pipe(gulp.dest(paths.output + 'commonjs')) .pipe(gulp.dest(paths.output + 'amd')) .pipe(gulp.dest(paths.output + 'system')) .pipe(gulp.dest(paths.output + 'es6')) .pipe(gulp.dest(paths.example)) }); gulp.task('build', function(callback) { return runSequence( 'clean', ['build-es6', 'build-commonjs', 'build-amd', 'build-system'], 'build-css', callback ); });
define((require, exports, module) => { return (store) => { store.subscribe((mutation, state) => { if (mutation.type === 'duty/updateDuty') { let { finished_at, horse_id2, horse_id1, field_id1, field_id2, bout_id1, bout_id2, param} = mutation.payload.updateData if(param){ let paramResult = { horse_id1: '', horse_id2: '', field_id1: '', field_id2: '', bout_id1: '', bout_id2: '' } _.each(paramResult, (v, k)=>{ if(mutation.payload.updateData[k]){ up_type = param[mutation.payload.updateData[k]].up_type is_max = param[mutation.payload.updateData[k]].is_max up_value = param[mutation.payload.updateData[k]].up_value valueResult = is_max ? 'MAX' : '+'+ up_value typeResult = ['機動', '統率', '偵察', '生存', '打撃', '衝力'][up_type-1] paramResult[k]='('+typeResult+valueResult+')' } }) if(finished_at){ store.commit('log/addDutyLog', { logId: `${moment(parseValues(finished_at)).unix()}`, finished_at: finished_at, horse_id2: horse_id2, horse_id1: horse_id1, field_id1: field_id1, field_id2: field_id2, bout_id1: bout_id1, bout_id2: bout_id2, param: paramResult })}}else{ if(finished_at){ store.commit('log/addDutyLog', { logId: `${moment(parseValues(finished_at)).unix()}`, finished_at: finished_at, horse_id2: horse_id2, horse_id1: horse_id1, field_id1: field_id1, field_id2: field_id2, bout_id1: bout_id1, bout_id2: bout_id2 }) }} //if (state.config.duty_notice == true) { if(_.every([horse_id1, horse_id2, field_id1, field_id2, bout_id1, bout_id2], _.isNull) || JSON.stringify(mutation.payload.updateData)=="{}" || JSON.stringify(mutation.payload.updateData)=="[]") { state.duty['status']=1 } else if (!finished_at) { finished_at = state.duty.finished_at state.duty['status']=2 } else{ state.duty['status']=2 } if(state.duty.isIntervalSet == false || state.duty.isIntervalSet == null) { //console.log("set interval") let check = setInterval(function isDutyFinished(){ state.duty.isIntervalSet = true state.duty.left_time = moment.utc(state.duty.finished_at-Date.now()).format('HH:mm:ss') if(finished_at != null && moment(parseValues(finished_at)).isBefore(Date.now()) && state.duty.status==2) { state.duty.left_time = '00:00:00' if (state.config.duty_notice == true) { store.dispatch('notice/addNotice', { title: `内番结束!`, message: `结束时间:${moment(parseValues(finished_at)).format('HH:mm:ss')}`, context: '请尽快收取!', renotify: true, disableAutoClose: true, swordBaseId: state.swords.serial[state.party.parties[1].slot[1].serial_id].sword_id, icon: `static/sword/${state.swords.serial[state.party.parties[1].slot[1].serial_id].sword_id}.png` })} state.duty.isIntervalSet = false clearInterval(check) } if(state.duty['status'] != 2){ state.duty.isNoticed = false state.duty.isIntervalSet = false clearInterval(check) } }, 1000) } //} } }) } })
import React, {Component} from 'react'; import {render} from 'react-dom'; import {Router, Route} from 'react-router'; import createBrowserHistory from 'history/lib/createBrowserHistory' import {App} from './App'; import NoMatch from './pages/NoMatch' export default() => { return ( <Router history={createBrowserHistory()}> <Route name="home" path="/" component={App}> </Route> <Route path="*" component={NoMatch}/> </Router> ) }
/* * Copyright (c) 2015-2018 Red Hat, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation */ 'use strict'; let ListStacks = function() { this.listElement = $('.stacks-list-content'); // header buttons this.addStackButtonElement = this.listElement.$('.che-list-add-button'); this.importButtonElement = this.listElement.$('.che-list-import-button'); // stacks list this.listItemElements = this.listElement.$$('.che-list-item'); this.splitStackItemByCell = (elem) => { return { title: elem.$('.stack-item-name'), description: elem.$('.stack-item-description'), components: elem.$('.stack-item-description'), actions: elem.$('.stack-item-actions') }; }; this.getListItemElementByName = (name) => { return this.listItemElements.filter((elem, index) => { return elem.element(by.cssContainingText('.stack-item-name', name)).isPresent().then(isPresent => isPresent); }).first(); }; }; module.exports = new ListStacks();
// Compiled by ClojureScript 0.0-2311 goog.provide('antares.repl'); goog.require('cljs.core'); goog.require('weasel.repl'); goog.require('weasel.repl'); console.log("WEASEL REPL ACTIVATED"); weasel.repl.connect.call(null,"ws://localhost:9001",new cljs.core.Keyword(null,"verbose","verbose",1694226060),true); //# sourceMappingURL=repl.js.map
/** * */ Ext.define('hwork.view.HWGrid', { extend: 'Ext.grid.Panel', alias: 'widget.hwGrid', frame: true, autoWidth: true, autoHeight: true, //title: 'FileList', store: 'HWStore', //selType: 'checkboxmodel', columns: [ {header: '序号', xtype: 'rownumberer', width: 40, sortable: false, locked: true }, {header: 'ID', dataIndex: 'baseId', flex: 1, align: 'center', hidden: true}, {header: '学年', dataIndex: 'academicYear', flex: 1, align: 'center'}, {header: '学期', dataIndex: 'semester', flex: 1, align: 'center'}, {header: '课程名称', dataIndex: 'courseName', flex: 2, align: 'center'}, {header: '班级名称', dataIndex: 'className', flex: 1, align: 'center'}, {header: '作业名称', dataIndex: 'name', flex: 2, align: 'center'}, {header: '学生名称', dataIndex: 'studentName', flex: 1, align: 'center'}, {header: '学生编号', dataIndex: 'studentId', flex: 1, align: 'center', hidden: true}, { header: '作业状态', dataIndex: 'status', flex: 1, align: 'center', renderer: function(val) { switch(val) { case 0: return '<span style="color:red;">未提交</span>'; break; case 1: return '<span style="color:green;">待审核 </span>'; break; case 2: return '<span style="color:blue;">已审核</span>'; break; case 3: return '<span style="color:red;">未通过</span>'; break; } } },{ xtype: 'actioncolumn', id: 'ctrlCell', flex: 1, header: '作业状态', align: 'center', sortable: false, menuDisabled: true, items: [{ xtype: 'button', id: 'startCtrl', iconCls: 'icon-upload', tooltip: '上传作业附件', action: 'start', hidden: true, scope: this },'-',{ xtype: 'button', id: 'startCtrl', iconCls: 'icon-download', tooltip: '预览作业附件', action: 'start', scope: this }] }, /*{ header: '作业状态', dataIndex: 'status', flex: 1, align: 'center', renderer : function(val) { if (val > 0) { return '<span style="color:green;">' + val + '</span>'; } else if (val < 0) { return '<span style="color:red;">' + val + '</span>'; } return val; } },*/ {header: '专业名称', dataIndex: 'majorName', flex: 1, align: 'center', hidden: true}, {header: '专业编号', dataIndex: 'majorCode', flex: 1, align: 'center', hidden: true}, {header: '教师姓名', dataIndex: 'teacherName', flex: 1, align: 'center', hidden: true}, {header: '教师编号', dataIndex: 'teacherCode', flex: 1, align: 'center', hidden: true}, {header: '课程编号', dataIndex: 'courseCode', flex: 1, align: 'center', hidden: true}, {header: '操作时间', dataIndex: 'operationTime', flex: 1, align: 'center', hidden: true}, {header: '创建时间', dataIndex: 'createTime', flex: 1, align: 'center', hidden: true}, {header: '最近修改时间', dataIndex: 'modifyTime', flex: 1, align: 'center', hidden: true} ], initComponent: function() { this.dockedItems = [{ xtype: 'pagingtoolbar', dock:'bottom', store: 'HWStore', displayInfo: true, displayMsg: 'Displaying contacts {0} - {1} of {2}', emptyMsg: "No contacts to display" }]; this.callParent(arguments); } });
var gulp = require('gulp'); var gutil = require('gulp-util'); var bower = require('bower'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minifyCss = require('gulp-minify'); var rename = require('gulp-rename'); var sh = require('shelljs'); var minify = require('gulp-minify'); var argv = require('yargs').argv; var mid = 0; for (arg in argv){ if (argv[arg] === true){ mid = parseInt(arg,16); // yeah, counting to f ;) } } var libs= [ "./www/lib/ionic/release/js/ionic.bundle.js", "./www/lib/moment/min/moment.min.js","./www/lib/angular-moment/angular-moment.min.js","./www/lib/moment/locale/fr.js","./www/lib/moment-timezone/builds/moment-timezone-with-data-2010-2020.min.js","./www/lib/openfb/openfb.js", "./www/lib/ngstorage/ngStorage.min.js","./www/lib/leaflet/dist/leaflet.js","./www/lib/angular-simple-logger/dist/angular-simple-logger.js","./www/lib/angular-leaflet-directive/dist/angular-leaflet-directive.min.js","./www/lib/ngCordova/dist/ng-cordova.min.js","./www/cordova.js" //, /* BUGGY */ "./www/lib/ng-walkthrough/ng-walkthrough.js" ] var paths = { sass: ['./scss/**/*.scss'], js: [ './www/js/*.js','./www/WhatTheFood/shared/*.js','./www/WhatTheFood/shared/**/*.js','./www/WhatTheFood/components/**/*.js' ], lib: libs, lib1: libs.slice(0,mid), mid : libs[mid], lib2: libs.slice(mid + 1) }; /* gulp.task('watch', function() { gulp.watch(paths.js, ['concat']); }); */ gulp.task('dbg', ['concat-lib1','concat-lib2','concat-mid']); gulp.task('concat-lib1',function(){ return gulp.src(paths.lib1) .pipe(concat('lib1-bundle.js')) .pipe(gulp.dest('./www/dist/')); }) gulp.task('concat-lib2',function(){ return gulp.src(paths.lib2) .pipe(concat('lib2-bundle.js')) .pipe(gulp.dest('./www/dist/')); }) gulp.task('concat-mid',function(){ return gulp.src(paths.mid) .pipe(concat('mid-bundle.js')) .pipe(gulp.dest('./www/dist/')); }) gulp.task('concat', ['concat-src','concat-lib']); gulp.task('concat-all', ['minify'],function(){ return gulp.src(['./www/dist/lib-bundle-min.js','./www/dist/app-bundle-min.js']) .pipe(concat('bundle-min.js')) .pipe(gulp.dest('./www/dist/')); }) gulp.task('concat-src', function() { return gulp.src(paths.js) .pipe(concat('app-bundle.js')) .pipe(gulp.dest('./www/dist/')); }); gulp.task('concat-lib', function() { return gulp.src(paths.lib) .pipe(concat('lib-bundle.js')) .pipe(gulp.dest('./www/dist/')); }); gulp.task('minify', ['concat'],function() { return gulp.src(['./www/dist/app-bundle.js','./www/dist/lib-bundle.js']) .pipe(minify({mangle:false})) .pipe(gulp.dest('./www/dist')); }); gulp.task('sass', function(done) { gulp.src('./scss/ionic.app.scss') .pipe(sass()) .pipe(gulp.dest('./www/css/')) .pipe(minifyCss({ keepSpecialComments: 0 })) .pipe(rename({ extname: '.min.css' })) .pipe(gulp.dest('./www/css/')) .on('end', done); }); gulp.task('watch', function() { gulp.watch(paths.sass, ['sass']); }); gulp.task('install', ['git-check'], function() { return bower.commands.install() .on('log', function(data) { gutil.log('bower', gutil.colors.cyan(data.id), data.message); }); }); gulp.task('git-check', function(done) { if (!sh.which('git')) { console.log( ' ' + gutil.colors.red('Git is not installed.'), '\n Git, the version control system, is required to download Ionic.', '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' ); process.exit(1); } done(); }); gulp.task('concat-and-minify', ['concat','minify']); gulp.task('default', ['concat-and-minify']);
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add('resize', { init:function (editor) { var config = editor.config; // Resize in the same direction of chrome, // which is identical to dir of editor element. (#6614) var resizeDir = editor.element.getDirection(1); !config.resize_dir && ( config.resize_dir = 'both' ); ( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 ); ( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 ); ( config.resize_minWidth == undefined ) && ( config.resize_minWidth = 750 ); ( config.resize_minHeight == undefined ) && ( config.resize_minHeight = 250 ); if (config.resize_enabled !== false) { var container = null, origin, startSize, resizeHorizontal = ( config.resize_dir == 'both' || config.resize_dir == 'horizontal' ) && ( config.resize_minWidth != config.resize_maxWidth ), resizeVertical = ( config.resize_dir == 'both' || config.resize_dir == 'vertical' ) && ( config.resize_minHeight != config.resize_maxHeight ); function dragHandler(evt) { var dx = evt.data.$.screenX - origin.x, dy = evt.data.$.screenY - origin.y, width = startSize.width, height = startSize.height, internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ), internalHeight = height + dy; if (resizeHorizontal) { width = Math.max(config.resize_minWidth, Math.min(internalWidth, config.resize_maxWidth)); } if (resizeVertical) { height = Math.max(config.resize_minHeight, Math.min(internalHeight, config.resize_maxHeight)); } editor.resize(width, height); } function dragEndHandler(evt) { CKEDITOR.document.removeListener('mousemove', dragHandler); CKEDITOR.document.removeListener('mouseup', dragEndHandler); if (editor.document) { editor.document.removeListener('mousemove', dragHandler); editor.document.removeListener('mouseup', dragEndHandler); } } var mouseDownFn = CKEDITOR.tools.addFunction(function ($event) { if (!container) { container = editor.getResizable(); } startSize = { width:container.$.offsetWidth || 0, height:container.$.offsetHeight || 0 }; origin = { x:$event.screenX, y:$event.screenY }; config.resize_minWidth > startSize.width && ( config.resize_minWidth = startSize.width ); config.resize_minHeight > startSize.height && ( config.resize_minHeight = startSize.height ); CKEDITOR.document.on('mousemove', dragHandler); CKEDITOR.document.on('mouseup', dragEndHandler); if (editor.document) { editor.document.on('mousemove', dragHandler); editor.document.on('mouseup', dragEndHandler); } }); editor.on('destroy', function () { CKEDITOR.tools.removeFunction(mouseDownFn); }); editor.on('themeSpace', function (event) { if (event.data.space == 'bottom') { var direction = ''; if (resizeHorizontal && !resizeVertical) { direction = ' cke_resizer_horizontal'; } if (!resizeHorizontal && resizeVertical) { direction = ' cke_resizer_vertical'; } var resizerHtml = '<div' + ' class="cke_resizer' + direction + ' cke_resizer_' + resizeDir + '"' + ' title="' + CKEDITOR.tools.htmlEncode(editor.lang.resize) + '"' + ' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event)"' + '></div>'; // Always sticks the corner of botttom space. resizeDir == 'ltr' && direction == 'ltr' ? event.data.html += resizerHtml : event.data.html = resizerHtml + event.data.html; } }, editor, null, 100); } } }); /** * The minimum editor width, in pixels, when resizing the editor interface by using the resize handle. * Note: It falls back to editor's actual width if it is smaller than the default value. * @name CKEDITOR.config.resize_minWidth * @type Number * @default 750 * @example * config.resize_minWidth = 500; */ /** * The minimum editor height, in pixels, when resizing the editor interface by using the resize handle. * Note: It falls back to editor's actual height if it is smaller than the default value. * @name CKEDITOR.config.resize_minHeight * @type Number * @default 250 * @example * config.resize_minHeight = 600; */ /** * The maximum editor width, in pixels, when resizing the editor interface by using the resize handle. * @name CKEDITOR.config.resize_maxWidth * @type Number * @default 3000 * @example * config.resize_maxWidth = 750; */ /** * The maximum editor height, in pixels, when resizing the editor interface by using the resize handle. * @name CKEDITOR.config.resize_maxHeight * @type Number * @default 3000 * @example * config.resize_maxHeight = 600; */ /** * Whether to enable the resizing feature. If this feature is disabled, the resize handle will not be visible. * @name CKEDITOR.config.resize_enabled * @type Boolean * @default true * @example * config.resize_enabled = false; */ /** * The dimensions for which the editor resizing is enabled. Possible values * are <code>both</code>, <code>vertical</code>, and <code>horizontal</code>. * @name CKEDITOR.config.resize_dir * @type String * @default 'both' * @since 3.3 * @example * config.resize_dir = 'vertical'; */
/** @format */ /** * External dependencies */ import { compact, isEqual } from 'lodash'; /** * Internal dependencies */ import { createReducer } from 'state/utils'; import { WOOCOMMERCE_PRODUCT_CATEGORY_CREATE, WOOCOMMERCE_PRODUCT_CATEGORY_UPDATE, WOOCOMMERCE_PRODUCT_CATEGORY_EDIT, WOOCOMMERCE_PRODUCT_CATEGORY_EDIT_CLEAR, WOOCOMMERCE_PRODUCT_CATEGORY_UPDATED, } from 'woocommerce/state/action-types'; import { getBucket } from '../helpers'; export default createReducer( null, { [ WOOCOMMERCE_PRODUCT_CATEGORY_EDIT ]: editProductCategoryAction, [ WOOCOMMERCE_PRODUCT_CATEGORY_EDIT_CLEAR ]: clearEditsAction, [ WOOCOMMERCE_PRODUCT_CATEGORY_UPDATED ]: productCategoryUpdatedAction, } ); function productCategoryUpdatedAction( edits, action ) { const { originatingAction } = action; if ( WOOCOMMERCE_PRODUCT_CATEGORY_CREATE === originatingAction.type ) { const prevCategoryId = originatingAction.category.id; const prevEdits = edits || {}; const prevCreates = prevEdits.creates || []; const newCreates = compact( prevCreates.map( category => { if ( isEqual( prevCategoryId, category.id ) ) { // Remove this create, it's no longer needed. return undefined; } return category; } ) ); return { ...prevEdits, creates: newCreates.length ? newCreates : undefined, }; } if ( WOOCOMMERCE_PRODUCT_CATEGORY_UPDATE === originatingAction.type ) { const prevCategoryId = originatingAction.category.id; const prevEdits = edits || {}; const prevUpdates = prevEdits.updates || []; const newUpdates = compact( prevUpdates.map( category => { if ( isEqual( prevCategoryId, category.id ) ) { return undefined; } return category; } ) ); return { ...prevEdits, updates: newUpdates.length ? newUpdates : undefined, }; } // TODO: Add support for delete. return edits; } function clearEditsAction() { return null; } function editProductCategoryAction( edits, action ) { const { category, data } = action; const prevEdits = edits || {}; const bucket = getBucket( category ); const newArray = editProductCategory( prevEdits[ bucket ], category, data ); return { ...prevEdits, [ bucket ]: newArray, currentlyEditingId: category.id, }; } function editProductCategory( array, category, data ) { const prevArray = array || []; let found = false; // Look for this object in the appropriate create or edit array first. const newArray = compact( prevArray.map( c => { if ( isEqual( category.id, c.id ) ) { found = true; // If data is null, remove this edit, otherwise update the edit data. return data ? { ...c, ...data } : undefined; } return c; } ) ); if ( ! found ) { // update or create not already in edit state, so add it now. newArray.push( { id: category.id, ...data } ); } return newArray; }
import { translate } from 'i18n-calypso'; import { registerHandlers } from 'calypso/state/data-layer/handler-registry'; import { bypassDataLayer } from 'calypso/state/data-layer/utils'; import { http } from 'calypso/state/data-layer/wpcom-http/actions'; import { dispatchRequest } from 'calypso/state/data-layer/wpcom-http/utils'; import { errorNotice } from 'calypso/state/notices/actions'; import { READER_UNSUBSCRIBE_TO_NEW_POST_NOTIFICATIONS } from 'calypso/state/reader/action-types'; import { subscribeToNewPostNotifications } from 'calypso/state/reader/follows/actions'; const noop = () => {}; export function fromApi( response ) { const isUnsubscribed = !! ( response && response.subscribed === false ); if ( ! isUnsubscribed ) { throw new Error( `Unsubscription from new post notifications failed with response: ${ JSON.stringify( response ) }` ); } return response; } export function requestNotificationUnsubscription( action ) { return http( { method: 'POST', apiNamespace: 'wpcom/v2', path: `/read/sites/${ action.payload.blogId }/notification-subscriptions/delete`, body: {}, // have to have an empty body to make wpcom-http happy }, action ); } export function receiveNotificationUnsubscriptionError( action ) { return [ errorNotice( translate( 'Sorry, we had a problem unsubscribing you from notifications. Please try again.' ) ), bypassDataLayer( subscribeToNewPostNotifications( action.payload.blogId ) ), ]; } registerHandlers( 'state/data-layer/wpcom/read/sites/notification-subscriptions/delete/index.js', { [ READER_UNSUBSCRIBE_TO_NEW_POST_NOTIFICATIONS ]: [ dispatchRequest( { fetch: requestNotificationUnsubscription, onSuccess: noop, onError: receiveNotificationUnsubscriptionError, fromApi, } ), ], } );
var config = require('../config'), mongoose = require('mongoose'), fixtures = require('node-mongoose-fixtures'), Q = require('q'); // Connect to database mongoose.connect(config.mongo.uri, config.mongo.options); var defer = Q.defer(); defer.promise.then(function() { console.log('Done'); process.exit(0); });
import Ember from 'ember'; export default Ember.Route.extend({ /** * Instance of the posts service. * * @property postsService * @type {Ember.Service} */ postsService: Ember.inject.service('posts'), /** * Instance of the tags service. * * @property tagsService * @type {Ember.Service} */ tagsService: Ember.inject.service('tags'), /** * Instance of the types service. * * @property typesService * @type {Ember.Service} */ typesService: Ember.inject.service('types'), /** * Instance of the images service. * * @property imagesService * @type {Ember.Service} */ imagesService: Ember.inject.service('images'), /** * Instance of the alerts service. * * @property alertsService * @type {Ember.Service} */ alertsService: Ember.inject.service('alerts'), beforeModel() { // Preload images tags and types let promises = [ this.get('tagsService').getAll(), this.get('typesService').getAll(), this.get('imagesService').getAll() ]; return Ember.RSVP.all(promises); }, model() { return { post: this.get('postsService').createNew() }; }, actions: { /** * View specified post page. * * @method viewPost * @return {Void} */ viewPost(id) { this.get('alertsService').success('Your post has been saved'); this.transitionTo('post', { postId: id }); } } });
{ base: 'az_circle_counter', name: Drupal.t('Circle counter'), icon: 'et et-icon-speedometer', // description: Drupal.t('Infographic Counter'), params: [{ type: 'colorpicker', heading: Drupal.t('Foreground color'), param_name: 'fgcolor', value: '#333333', }, { type: 'colorpicker', heading: Drupal.t('Background color'), param_name: 'bgcolor', value: '#999999', }, { type: 'colorpicker', heading: Drupal.t('Fill'), param_name: 'fill', }, { type: 'checkbox', heading: Drupal.t('Half Circle'), param_name: 'type', value: { 'half': Drupal.t("Yes"), }, }, { type: 'bootstrap_slider', heading: Drupal.t('Dimension'), param_name: 'dimension', max: '500', value: '250', }, { type: 'textfield', heading: Drupal.t('Text'), param_name: 'text', tab: Drupal.t('Circle content'), }, { type: 'bootstrap_slider', heading: Drupal.t('Font size'), param_name: 'fontsize', max: '100', value: '16', formatter: true, tab: Drupal.t('Circle content'), }, { type: 'textfield', heading: Drupal.t('Info'), param_name: 'info', tab: Drupal.t('Circle content'), }, { type: 'bootstrap_slider', heading: Drupal.t('Width'), param_name: 'width', max: '100', value: '5', }, { type: 'bootstrap_slider', heading: Drupal.t('Percent'), param_name: 'percent', max: '100', value: '50', }, { type: 'dropdown', heading: Drupal.t('Border style'), param_name: 'border', value: { 'default': Drupal.t('Default'), 'inline': Drupal.t('Inline'), 'outline': Drupal.t('Outline'), }, }, { type: 'icon', heading: Drupal.t('Icon'), param_name: 'icon', tab: Drupal.t('Icon'), }, { type: 'bootstrap_slider', heading: Drupal.t('Icon size'), param_name: 'icon_size', max: '100', description: Drupal.t('Will set the font size of the icon.'), value: '16', tab: Drupal.t('Icon'), }, { type: 'colorpicker', heading: Drupal.t('Icon color'), param_name: 'icon_color', description: Drupal.t('Will set the font color of the icon.'), tab: Drupal.t('Icon'), }, ], show_settings_on_create: true, frontend_render: true, showed: function($) { this.baseclass.prototype.showed.apply(this, arguments); var icon_set = this.attrs['icon'].charAt(0); switch (icon_set) { case 'e': this.add_css('vendor/et-line-font/et-line-font.css', 'ETLineFont' in $.fn, function() {}); break; case 'f': this.add_css('vendor/font-awesome/css/font-awesome.min.css', 'fontAwesome' in $.fn, function() {}); break; case 'p': this.add_css('vendor/pe-icon-7-stroke/css/pe-icon-7-stroke.css', 'PELineFont' in $.fn, function() {}); break; default: break; } var element = this; this.add_css('vendor/jquery.circliful/css/jquery.circliful.css', 'circliful' in $.fn, function() {}); this.add_js_list({ paths: ['vendor/jquery.circliful/js/jquery.circliful.min.js', 'vendor/jquery.waypoints/lib/jquery.waypoints.min.js' ], loaded: 'waypoint' in $.fn && 'circliful' in $.fn, callback: function() { $(element.dom_element).waypoint(function(direction) { $(element.dom_element).find('#' + element.id).once().circliful(); }, { offset: '100%', handler: function(direction) { this.destroy() }, }); $(document).trigger('scroll'); } }); }, render: function($) { if (this.attrs['icon']) { var circliful_icon = '" data-icon=" ' + this.attrs['icon'] + '" data-iconsize="' + this.attrs[ 'icon_size'] + '" data-iconcolor="' + this.attrs['icon_color']; } else { var circliful_icon = ''; } this.dom_element = $('<div class="az-element az-circle-counter ' + this.attrs['el_class'] + '" style="' + this.attrs['style'] + '"><div id="' + this.id + '" data-dimension="' + this.attrs['dimension'] + '" data-text="' + this.attrs['text'] + '" data-info="' + this.attrs['info'] + '" data-width="' + this .attrs['width'] + '" data-fontsize="' + this.attrs['fontsize'] + '" data-type="' + this.attrs['type'] + '" data-percent="' + this.attrs['percent'] + '" data-fgcolor="' + this.attrs['fgcolor'] + '" data-bgcolor="' + this.attrs['bgcolor'] + '" data-fill="' + this.attrs['fill'] + '" data-border="' + this.attrs['border'] + circliful_icon + '"></div></div>'); this.baseclass.prototype.render.apply(this, arguments); }, },
/* This file is part of Ext JS 4.2 Copyright (c) 2011-2014 Sencha Inc Contact: http://www.sencha.com/contact Commercial Usage Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2014-09-02 11:12:40 (ef1fa70924f51a26dacbe29644ca3f31501a5fce) */ /** * @private */ Ext.define('Ext.chart.MaskLayer', { extend: 'Ext.Component', constructor: function(config) { config = Ext.apply(config || {}, { style: 'position:absolute;background-color:#ff9;cursor:crosshair;opacity:0.5;border:1px solid #00f;' }); this.callParent([config]); }, initComponent: function() { var me = this; me.callParent(arguments); me.addEvents( 'mousedown', 'mouseup', 'mousemove', 'mouseenter', 'mouseleave' ); }, initDraggable: function() { this.callParent(arguments); this.dd.onStart = function (e) { var me = this, comp = me.comp; // Cache the start [X, Y] array this.startPosition = comp.getPosition(true); // If client Component has a ghost method to show a lightweight version of itself // then use that as a drag proxy unless configured to liveDrag. if (comp.ghost && !comp.liveDrag) { me.proxy = comp.ghost(); me.dragTarget = me.proxy.header.el; } // Set the constrainTo Region before we start dragging. if (me.constrain || me.constrainDelegate) { me.constrainTo = me.calculateConstrainRegion(); } }; } });
jQuery(document).ready(function($){ $( "#remove_sp_league_menu_logo" ).click(function() { $( ".sp-league-menu-logo-options" ).hide(); $("<input>").attr({ type: "hidden", id: "sp_league_menu_logo_removed", name: "sp_league_menu_logo_removed" }).appendTo( $(this).parent() ); }); $( "#sportspress_league_menu_logo_width" ).on( "input", function() { $( ".sp-league-menu-logo-options img" ).css( "max-width", $(this).val() + 'px' ); }); $( "#sportspress_league_menu_logo_height" ).on( "input", function() { $( ".sp-league-menu-logo-options img" ).css( "max-height", $(this).val() + 'px' ); }); });
jQuery( document ).ready( function() { jQuery( '#lightslider' ).lightSlider({ item: 1, autoWidth: false, slideMove: 1, // slidemove will be 1 if loop is true slideMargin: 10, addClass: '', mode: "slide", useCSS: true, cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',// easing: 'linear', //'for jquery animation',//// speed: 400, //ms' auto: true, loop: true, slideEndAnimation: true, pause: 5000, keyPress: false, controls: true, prevHtml: '<span class="dashicons dashicons-arrow-left-alt2">', nextHtml: '<span class="dashicons dashicons-arrow-right-alt2">', rtl:false, adaptiveHeight:false, vertical:false, verticalHeight:500, vThumbWidth:100, thumbItem:10, pager: true, gallery: false, galleryMargin: 5, thumbMargin: 5, currentPagerPosition: 'middle', enableTouch:true, enableDrag:true, freeMove:true, swipeThreshold: 40, responsive : [], onBeforeStart: function (el) {}, onSliderLoad: function (el) {}, onBeforeSlide: function (el) {}, onAfterSlide: function (el) {}, onBeforeNextSlide: function (el) {}, onBeforePrevSlide: function (el) {} }); });
A = require('./using_module_exports_a'); module.exports = { b: function() { return A.a() } };
/* * equalcolumnheight * https://github.com/mortennajbjerg/jquery.equalcolumnheight * * Copyright (c) 2013 Morten Najbjerg * Licensed under the GPLv3 license. */ (function($) { $.fn.equalcolumnheight = function() { var $this = $(this), heighest = 0; // Calculate the heighest element and return integer var getHeighestValue = function() { var heights = getElementsHeight(); return Math.max.apply($this, heights ); }; // Return array of all element heights var getElementsHeight = function() { return $.map( $this , function(e){ return $(e).outerHeight(); }); }; // Set a height on all elements var setElementsHeight = function(value) { $this.css('height', value); }; var init = function() { setElementsHeight('auto'); heighest = getHeighestValue(); setElementsHeight(heighest); }; // Set resize $( window ).resize(function() { init(); }); // Make sure that this works even // if the columns has images inside them $( window ).load(function() { init(); }); init(); }; }(jQuery));
define([ "jquery", "fx-cat-br/widgets/Fx-widgets-commons", 'text!fx-cat-br/json/fx-catalog-collapsible-menu-config.json', "lib/bootstrap" ], function ($, W_Commons, conf) { var o = { }, defaultOptions = { widget: { lang: 'EN' }, events: { SELECT: 'fx.catalog.module.select' } }; var cache = {}, w_Commons, $collapse; function Fx_Catalog_Collapsible_Menu() { w_Commons = new W_Commons(); } Fx_Catalog_Collapsible_Menu.prototype.init = function (options) { //Merge options $.extend(o, defaultOptions); $.extend(o, options); }; Fx_Catalog_Collapsible_Menu.prototype.render = function (options) { $.extend(o, options); cache.json = JSON.parse(conf); this.initStructure(); this.renderMenu(cache.json); }; Fx_Catalog_Collapsible_Menu.prototype.initStructure = function () { o.collapseId = "fx-collapse-" + w_Commons.getFenixUniqueId(); $collapse = $('<div class="panel-group" id="accordion"></div>'); $collapse.attr("id", o.collapseId); $(o.container).append($collapse); }; Fx_Catalog_Collapsible_Menu.prototype.renderMenu = function (json) { var self = this; if (json.hasOwnProperty("panels")) { var panels = json.panels; for (var i = 0; i < panels.length; i++) { $collapse.append(self.buildPanel(panels[i])) } $(o.container).append($collapse) } else { throw new Error("Fx_Catalog_Collapsible_Menu: no 'panels' attribute in config JSON.") } }; Fx_Catalog_Collapsible_Menu.prototype.buildPanel = function (panel) { var self = this, id = "fx-collapse-panel-" + w_Commons.getFenixUniqueId(); var $p = $(document.createElement("DIV")); $p.addClass("panel"); $p.addClass("panel-default"); $p.append(self.buildPanelHeader(panel, id)); $p.append(self.buildPanelBody(panel, id)); return $p; }; Fx_Catalog_Collapsible_Menu.prototype.buildPanelHeader = function (panel, id) { //Init header var $header = $('<div class="panel-heading"></div>'), $title = $('<h4 class="panel-title fx-menu-category-title"></h4>'), $a = $('<a data-toggle="collapse"></a>'), $info = $('<div class="fx-catalog-modular-menu-category-info"></div>'), $plus = $('<div class="fx-catalog-modular-menu-category-plus"></div>'); $a.attr("data-parent", "#" + o.collapseId); $a.attr("href", "#" + id); if (panel.hasOwnProperty("title")) { $a.html(panel["title"][o.widget.lang]); } return $header.append($title.append($a.append($plus)).append($info)); }; Fx_Catalog_Collapsible_Menu.prototype.buildPanelBody = function (panel, id) { //Init panel body var $bodyContainer = $("<div class='panel-collapse collapse'></div>"); $bodyContainer.attr("id", id); var $body = $('<div class="panel-body"></div>'); if (panel.hasOwnProperty("modules")) { var modules = panel["modules"]; for (var j = 0; j < modules.length; j++) { var $module = $("<div></div>"), $btn = $('<button type="button" class="btn btn-default btn-block"></button>'); $btn.on('click', {module: modules[j] }, function (e) { var $btn = $(this); if ($btn.is(':disabled') === false) { $btn.attr("disabled", "disabled"); w_Commons.raiseCustomEvent(o.container, o.events.SELECT, e.data.module) } }); if (modules[j].hasOwnProperty("id")) { $btn.attr("id", modules[j].id); } if (modules[j].hasOwnProperty("module")) { $btn.attr("data-module", modules[j].module); } //Keep it before the label to have the icon in its the left side if (modules[j].hasOwnProperty("icon")) { $btn.append($('<span class="' + modules[j].icon + '"></span>')); } if (modules[j].hasOwnProperty("label")) { $btn.append(modules[j].label[o.widget.lang]); } if (modules[j].hasOwnProperty("popover")) { /* console.log(modules[j]["popover"]) var keys = Object.keys(modules[j]["popover"]); for (var k = 0; k < keys.length; k++ ){ $btn.attr(keys[k], modules[j]["popover"][keys[k]]) }*/ } $module.append($btn); $body.append($module) } } return $bodyContainer.append($body); }; Fx_Catalog_Collapsible_Menu.prototype.disable = function (module) { $(o.container).find("[data-module='" + module + "']").attr("disabled", "disabled"); }; Fx_Catalog_Collapsible_Menu.prototype.activate = function (module) { $(o.container).find("[data-module='" + module + "']").removeAttr("disabled"); }; return Fx_Catalog_Collapsible_Menu; });
function triggerEventAfterBootstrap(checkout) { jQuery(document).trigger("wpshopify_bootstrap_after", [checkout]); } function triggerEventBeforeBootstrap() { jQuery(document).trigger("wpshopify_bootstrap_before"); } function triggerEventAfterAddToCart(product, checkout) { jQuery(document).trigger("wpshopify_add_to_cart_after", [product, checkout]); } function triggerEventBeforeAddToCart(product) { jQuery(document).trigger("wpshopify_add_to_cart_before", [product]); } export { triggerEventAfterBootstrap, triggerEventBeforeBootstrap, triggerEventAfterAddToCart, triggerEventBeforeAddToCart }
module.exports = { client_id: "", secret: "", scope: "", redirectURI: 'http://localhost:8080/callback', //make sure this is the same as the callback URI in github // This token has to be from a user with permission to add students on Github ownerPersonalAccessToken: "", // User has to be a member of this group to add students mentorGroupId: 1163899, // Invitations will be sent to join this group studentGroupId: 1163900, // The name of the host host: "localhost", // The port for the server port: 8080 };
jQuery(document).ready(function($) { $(".wp-list-table tbody").sortable({handle:".kpm-handle-column", cursor: 'url(images/closedhand.cur)', helper:function(e, ui) { ui.children().each(function() { $(this).width($(this).width()); }); return ui; }, start:function () { $('.kpm-handle-column').addClass('kpm-close-hand'); }, stop:function() { params = { action:'kpm_br_reorder_items', nonce:$("#_wpnonce").val() }; fields = $('input:hidden[name="order[]"]').serialize(); params = fields + '&' + $.param(params); $.post(ajaxurl, params); $('.kpm-handle-column').removeClass('kpm-close-hand'); $('.kpm-order-column').each(function(n) { $(this).html(n+1); $(this).parent().toggleClass("alternate", n%2 == 0); }); } }); });
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var admin = require('./routes/admin'); var public = require('./routes/public'); var login = require('./routes/login'); var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); // uncomment after placing your favicon in /public //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use("/public", express.static(path.join(__dirname, 'public'))); app.use("/bower_components", express.static(path.join(__dirname, 'bower_components'))); var basicAuth = require(path.join(__dirname, "./utils/basic-auth")); app.use("/api/admin",basicAuth); app.use('/', routes); app.use('/api/public', public); app.use('/api/admin', admin); app.use('/api', login); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: err }); }); } // production error handler // no stacktraces leaked to user app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: {} }); }); var mongoose = require("mongoose"); if(app.get('env') === 'development') { mongoose.set('debug', true); } var config = require(path.join(__dirname, "./config/"+app.get("env"))); var db = mongoose.connect(config.db.url, config.db.options).connection; db.on("error", console.error.bind(console, "connection error")); //When conection is opened db.once("open", function(callback) { }); // When the connection is disconnected db.on('disconnected', function () { console.log('Mongoose default connection disconnected'); }); // If the Node process ends, close the Mongoose connection process.on('SIGINT', function() { db.close(function () { console.log('Mongoose default connection disconnected through app termination'); process.exit(0); }); }); module.exports = app;
jQuery(document).ready(function($){ /* Click Tab */ $( document.body ).on( 'click', '#fxb-switcher a.nav-tab', function(e){ e.preventDefault(); /* Bail */ if( $( this ).hasClass( 'nav-tab-active' ) ){ return false; } /* Confirm ? */ if( ! $( this ).hasClass( 'switch-confirmed' ) ){ if ( true !== confirm( $( this ).data( 'confirm' ) ) ) { return false; } } /* Add Confirmed Class */ $( this ).addClass( 'switch-confirmed' ); /* Force Switch to Visual Editor */ $.fn.fxB_switchEditor( "fxb_editor" ); var this_data = $( this ).data( 'fxb-switcher' ); /* Clicking "Editor" */ if( 'editor' == this_data ){ $( 'html' ).removeClass( 'fx_builder_active' ); $( 'input[name="_fxb_active"]' ).val( '' ); $( this ).addClass( 'nav-tab-active' ); $( this ).siblings( '.nav-tab' ).removeClass( 'nav-tab-active' ); } else if( 'builder' == this_data ){ $( 'html' ).addClass( 'fx_builder_active' ); $( 'input[name="_fxb_active"]' ).val( '1' ); $( this ).addClass( 'nav-tab-active' ); $( this ).siblings( '.nav-tab' ).removeClass( 'nav-tab-active' ); } }); });
import { request } from '@octokit/request'; import { getUserAgent } from 'universal-user-agent'; const VERSION = "4.5.6"; class GraphqlError extends Error { constructor(request, response) { const message = response.data.errors[0].message; super(message); Object.assign(this, response.data); Object.assign(this, { headers: response.headers }); this.name = "GraphqlError"; this.request = request; // Maintains proper stack trace (only available on V8) /* istanbul ignore next */ if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } } } const NON_VARIABLE_OPTIONS = [ "method", "baseUrl", "url", "headers", "request", "query", "mediaType", ]; const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; function graphql(request, query, options) { if (typeof query === "string" && options && "query" in options) { return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); } const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { if (NON_VARIABLE_OPTIONS.includes(key)) { result[key] = parsedOptions[key]; return result; } if (!result.variables) { result.variables = {}; } result.variables[key] = parsedOptions[key]; return result; }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); } return request(requestOptions).then((response) => { if (response.data.errors) { const headers = {}; for (const key of Object.keys(response.headers)) { headers[key] = response.headers[key]; } throw new GraphqlError(requestOptions, { headers, data: response.data, }); } return response.data.data; }); } function withDefaults(request$1, newDefaults) { const newRequest = request$1.defaults(newDefaults); const newApi = (query, options) => { return graphql(newRequest, query, options); }; return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), endpoint: request.endpoint, }); } const graphql$1 = withDefaults(request, { headers: { "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`, }, method: "POST", url: "/graphql", }); function withCustomRequest(customRequest) { return withDefaults(customRequest, { method: "POST", url: "/graphql", }); } export { graphql$1 as graphql, withCustomRequest }; //# sourceMappingURL=index.js.map
/** * Compiles LESS files into CSS. * * --------------------------------------------------------------- * * Only the `assets/styles/importer.less` is compiled. * This allows you to control the ordering yourself, i.e. import your * dependencies, mixins, variables, resets, etc. before other stylesheets) * * For usage docs see: * https://github.com/gruntjs/grunt-contrib-less */ module.exports = function(grunt) { grunt.config.set('less', { dev: { files: [/*{ expand: true, cwd: 'assets/styles/', src: ['importer.less'], dest: '.tmp/public/styles/', ext: '.css' },*/ { expand: true, cwd: 'assets/styles/dashboard/', src: ['dashboard.less'], dest: '.tmp/public/styles/dashboard/', ext: '.css' }] } }); grunt.loadNpmTasks('grunt-contrib-less'); };
angular.module('NetPlanningApp').controller('AppCtrl', function($mdSidenav, $mdDialog, $mdToast, $scope, $location, $localStorage, $translate, amMoment, settings, DataService) { 'use strict'; var vm = this; vm.$storage = $localStorage; vm.DataService = DataService; vm.username = ''; vm.password = ''; vm.errorMessage = null; vm.$localStorage = $localStorage; vm.availableLanguages = { 'en': 'English', 'it': 'Italiano', 'fr': 'French' }; $localStorage.$default({ language: settings.defaultLanguage }); $scope.$watch(function() { return $localStorage.language; }, function(val) { $translate.use(val); amMoment.changeLocale(val); }); vm.update = function() { var errorMessage = '<md-icon md-svg-src="images/ic_settings_48px.svg" class="md-warn" aria-label="settings"></md-icon>'; errorMessage += $translate.instant('ERROR_LOADING_DATA'); DataService.loadItems(true).catch(function() { $mdToast.show({ templateUrl: 'partials/toast-error.html', position: 'top right', hideDelay: 800 }); }); }; vm.login = function() { vm.errorMessage = null; DataService.login(vm.username, vm.password).then(function() { DataService.loadItems(false); }).catch(function(reason) { vm.errorMessage = reason.status > -1 ? reason.data.message : $translate.instant('NETWORK_ERROR'); }).finally(function() { vm.username = ''; vm.password = ''; }); }; vm.logout = function() { var title = $translate.instant('LOGOUT').capitalize(); var content = $translate.instant('ARE_YOU_SURE_YOU_WANT_TO_LOGOUT').capitalize() + ' ?'; var btnOk = $translate.instant('OK'); var btnCancel = $translate.instant('CANCEL'); var dialog = $mdDialog .confirm() .title(title) .textContent(content) .ariaLabel('Logout') .ok(btnOk) .cancel(btnCancel); $mdDialog .show(dialog) .then(DataService.logout); }; vm.toggleSidenav = function(menuId) { $mdSidenav(menuId).toggle(); }; vm.navigateAndToggleSidenav = function(location, menuId) { $mdSidenav(menuId).toggle(); $location.path(location); }; });
// The worker we construct depends on the environment we're in (nodejs or webbrowser); module.exports = function makeChessWorker() { try { // Reference error if in nodejs Worker; const worker = new Worker('scalachessworker.js'); return worker; } catch (e) { const rootDir = `${__dirname.replace('ctrl', '')}/`; const path =`${rootDir}vendor/scalachessjs/scalachess.js`; const ChessWorker = require('tiny-worker'); return new ChessWorker(path); } }
'use strict'; let {ko, Helper} = require('../common'), DialogManager = require('../DialogManager'), DEFAULT_WIDTH = 530, TEMPLATES = { DEFAULT: 'confirmDialogTpl' }, instance, getInstance = function(confirmCallback, optionalTemplateName, optionalContextVars) { Helper.assertStringOrEmpty(optionalTemplateName, 'invalid tempalte name for ConfirmDialog.getInstance()'); if (!instance) { instance = new ConfirmDialog(); } instance.setConfirmCallback(confirmCallback); instance.setTemplateName(optionalTemplateName); instance.setContextVars(optionalContextVars); instance.settings.modalWidth = (TEMPLATES.REVERT_ENTRY === optionalTemplateName) ? 550 : DEFAULT_WIDTH; return instance; }; /** * A simple "Möchten Sie wirklich fortfahren?" confirm dialog. * @constructor */ function ConfirmDialog() { let self = this, dialogManager = DialogManager.getInstance(), confirmCallback = null; this.settings = DialogManager.createDialogSettings({ templateName: TEMPLATES.DEFAULT, modalWidth: DEFAULT_WIDTH }); /** * Object containing properties that might be used in the template via data-bind. */ this.contextVars = null; /** * Sets the template name for this dialog or the default templateName if empty. * @param [templateName] (String) the template to set; If falsy, the {@link TEMPLATES.DEFAULT} is set * @returns (Object) this instance (chainable) */ this.setTemplateName = function(templateName) { Helper.assertStringOrEmpty(templateName, 'Invalid templateName for ConfirmDialog'); this.settings.templateName = templateName || TEMPLATES.DEFAULT; return this; }; /** * Sets the callback function called on the positive button. * @param callback (function) e.g. function(confirmDialog){..} */ this.setConfirmCallback = function(callback) { Helper.assertFunction(callback, 'Invalid confirm callback for ConfirmDialog'); confirmCallback = callback; }; this.setContextVars = function(newContextVars) { this.contextVars = newContextVars || null; }; /** * Triggered via data-bind by the template's ok button. */ this.confirm = function() { confirmCallback(self); dialogManager.reset(); return false; }; this.show = function() { dialogManager.showDialog(this); }; } module.exports = { getInstance, getInstanceForSomething: function(someInfo, onConfirm) { return getInstance(onConfirm, TEMPLATES.DEFAULT, {someInfo: someInfo}); } };
/** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /* eslint-disable max-nested-callbacks */ define([ 'jquery', 'mage/backend/bootstrap' ], function ($) { 'use strict'; describe('mage/backend/bootstrap', function () { var $pageMainActions; beforeEach(function () { $pageMainActions = $('<div class="page-main-actions"></div>'); }); afterEach(function () { $pageMainActions.remove(); }); describe('"sendPostponeRequest" method', function () { it('should insert "Error" notification if request failed', function () { $pageMainActions.appendTo('body'); $('body').notification(); $.ajaxSettings.error(); expect($('.message-error').length).toBe(1); expect( $('body:contains("A technical problem with the server created an error")').length ).toBe(1); }); }); }); });
/* * Copyright (c) 2009, 2010 and 2011 Frank G. Bennett, Jr. All Rights * Reserved. * * The contents of this file are subject to the Common Public * Attribution License Version 1.0 (the “License”); you may not use * this file except in compliance with the License. You may obtain a * copy of the License at: * * http://bitbucket.org/fbennett/citeproc-js/src/tip/LICENSE. * * The License is based on the Mozilla Public License Version 1.1 but * Sections 14 and 15 have been added to cover use of software over a * computer network and provide for limited attribution for the * Original Developer. In addition, Exhibit A has been modified to be * consistent with Exhibit B. * * Software distributed under the License is distributed on an “AS IS” * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is the citation formatting software known as * "citeproc-js" (an implementation of the Citation Style Language * [CSL]), including the original test fixtures and software located * under the ./std subdirectory of the distribution archive. * * The Original Developer is not the Initial Developer and is * __________. If left blank, the Original Developer is the Initial * Developer. * * The Initial Developer of the Original Code is Frank G. Bennett, * Jr. All portions of the code written by Frank G. Bennett, Jr. are * Copyright (c) 2009, 2010 and 2011 Frank G. Bennett, Jr. All Rights Reserved. * * Alternatively, the contents of this file may be used under the * terms of the GNU Affero General Public License (the [AGPLv3] * License), in which case the provisions of [AGPLv3] License are * applicable instead of those above. If you wish to allow use of your * version of this file only under the terms of the [AGPLv3] License * and not to allow others to use your version of this file under the * CPAL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the * [AGPLv3] License. If you do not delete the provisions above, a * recipient may use your version of this file under either the CPAL * or the [AGPLv3] License.” */ dojo.provide("citeproc_js.dateparsetoarray"); var keycount = function(obj){ var c=0; for (pos in obj) { c+=1; } return c; }; doh.register("tests.dateparsetoarray", [ function test_dateparsetoarray029() { var parser = new CSL.DateParser; parser.returnAsArray(); var res = parser.parse("Aug 15 2000 - Aug 20 2000"); doh.assertEqual("2000", res["date-parts"][1][0]); doh.assertEqual("8", res["date-parts"][0][1]); doh.assertEqual("20", res["date-parts"][1][2]); doh.assertEqual("2000", res["date-parts"][0][0]); doh.assertEqual("8", res["date-parts"][1][1]); doh.assertEqual("15", res["date-parts"][0][2]); doh.assertEqual(1, keycount(res) ); } ]);
function c_game(piece, display, score) { this.piece = piece; this.display = display; this.score = score; this.speed = 250; } c_game.prototype.reassign = function(y) { var x; var tmp; while (y > 0) { tmp = y - 1; x = 1; while (this.display.map[tmp][x] != null) { this.display.map[y][x] = this.display.map[tmp][x]; x++; } y--; } }
app.directive("portfolio", function(socket, upload, ms, filterFilter) { return { restrict: 'E', templateUrl: '/directives/templates/portfolioDirective.html', scope: false, link: function(scope, elements, attrs) { scope.uploads = []; scope.controllerPlaceholder = false; scope.portfolioController = 'Current Projects'; scope.filteredProjects = filterFilter(scope.userData.projects, function(value, index){ if(value.status == 'running'){ //alert('found file' + value.name); return true }; }); if (scope.userData.projects == undefined) { scope.userData.projects = []; } /* if (localStorage['userData']) { var newData = JSON.parse(localStorage['userData']); console.log(" portfolio localStorage exists"); console.log(newData); scope.filteredProjects = filterFilter(scope.userData.projects, function(value, index){ if(value.status == 'running'){ //alert('found file' + value.name); return true }; }); if (scope.userData.projects == undefined) { scope.userData.projects = []; } } else{ console.log(" portfolio localStorage does not exist"); socket.emit('restricted', 'request portfolio', localStorage['token']); };*/ socket.on('restricted', 'recieve portfolio',function(data) { var newData = JSON.parse(data); console.log(newData); scope.userData.projects = newData.projects; scope.filteredProjects = filterFilter(scope.userData.projects, function(value, index){ if(value.status == 'running'){ //alert('found file' + value.name); return true }; }); if (scope.userData.projects == undefined) { scope.userData.projects = []; } console.log(scope.userData.projects); }); socket.on('restricted', 'recieve portfolioUpdate',function(project) { scope.userData.projects.push(project); console.log(scope.userData.projects); var oldData = JSON.parse(localStorage['userData']); oldData.projects = scope.userData.projects; scope.filteredProjects = filterFilter(scope.userData.projects, function(value, index){ if(value.status == 'running'){ //alert('found file' + value.name); return true }; }); localStorage['userData']= JSON.stringify(oldData); console.log('updated portfolio localStorage'); console.log(localStorage['userData']); scope.$root.$broadcast('portfolioCropModalWindowClose'); }); /*Bubbles var chart, render_vis, display_all, display_year, toggle_view, update; chart = null; render_vis = function(csv) { console.log(csv); chart = new BubbleChart(csv); chart.start(); return chart.display_group_all(); }; update = function(csv) { chart.update_vis(csv); chart.start(); return chart.display_group_all(); }; //d3.csv("data/gates_money_current.csv", render_vis); render_vis(scope.userData.projects); */ document.getElementById('portfolioDropZone').addEventListener("drop", function(event){ event.preventDefault(); console.log(event); if ('dataTransfer' in event) { var files = event.dataTransfer.files; } else if('originalTarget' in event){ var files = event.originalTarget.files; }else if('target' in event){ var files = event.target.files; }else{ var files = event.files; }; for(var i=0; i<files.length; i++){ scope.uploads.push([ms.sealer("portfolio" + i, files[i].name), files]); }; }, false); //3 document.getElementById('portfolioDrop').addEventListener("change", function(event){ event.preventDefault(); if ('dataTransfer' in event) { var files = event.dataTransfer.files; } else if('originalTarget' in event){ var files = event.originalTarget.files; }else if('target' in event){ var files = event.target.files; }else{ var files = event.files; }; console.log(files); for(var i=0; i<files.length; i++){ scope.uploads.push([ms.sealer("portfolio" + i, files[i].name), files]); }; }, false); upload.listenOnInput(document.getElementById('portfolioDrop')); upload.listenOnDrop(document.getElementById('portfolioDropZone')); scope.changeData = function(expressionArg) { scope.filteredProjects = filterFilter(scope.userData.projects, function(value, index){ if(value.status == expressionArg){ return true }; }); }; /*scope.changeData = function(value) { if (value == "Current Projects") { d3.csv("data/gates_money_current.csv", update); scope.controllerPlaceholder = false; } else if (value == "Portfolio"){ if (scope.controllerPlaceholder) { chart.display_group_all(); }else{ d3.csv("data/gates_money.csv", update); scope.controllerPlaceholder = true; } } else{ chart.display_by_year(); } };*/ } }; });
<<<<<<< HEAD /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Style" command. */ var FCKStyleCommand = function() {} FCKStyleCommand.prototype = { Name : 'Style', Execute : function( styleName, styleComboItem ) { FCKUndo.SaveUndoStep() ; if ( styleComboItem.Selected ) FCK.Styles.RemoveStyle( styleComboItem.Style ) ; else FCK.Styles.ApplyStyle( styleComboItem.Style ) ; FCKUndo.SaveUndoStep() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument ) return FCK_TRISTATE_DISABLED ; if ( FCKSelection.GetType() == 'Control' ) { var el = FCKSelection.GetSelectedElement() ; if ( !el || !FCKStyles.CheckHasObjectStyle( el.nodeName.toLowerCase() ) ) return FCK_TRISTATE_DISABLED ; } return FCK_TRISTATE_OFF ; } }; ======= /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Style" command. */ var FCKStyleCommand = function() {} FCKStyleCommand.prototype = { Name : 'Style', Execute : function( styleName, styleComboItem ) { FCKUndo.SaveUndoStep() ; if ( styleComboItem.Selected ) FCK.Styles.RemoveStyle( styleComboItem.Style ) ; else FCK.Styles.ApplyStyle( styleComboItem.Style ) ; FCKUndo.SaveUndoStep() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument ) return FCK_TRISTATE_DISABLED ; if ( FCKSelection.GetType() == 'Control' ) { var el = FCKSelection.GetSelectedElement() ; if ( !el || !FCKStyles.CheckHasObjectStyle( el.nodeName.toLowerCase() ) ) return FCK_TRISTATE_DISABLED ; } return FCK_TRISTATE_OFF ; } }; >>>>>>> origin/master
/** * Created by Lucian Tuca on 11/05/15. */ var DeleteSelectedCommand = function(commandString) { this.commandString = commandString; }; DeleteSelectedCommand.prototype.execute = function(context) { // Map with the action from the context - basically what the command does. context.deleteShape(); }; // Command's name DeleteSelectedCommand.prototype.NAME = "Delete selected"; // Command's regexp DeleteSelectedCommand.prototype.REGEXP = new RegExp('delete\\sselected', 'i'); // Command's help DeleteSelectedCommand.prototype.HELP = "delete selected";
var infoCtrl = require('../controllers/infoCtrl.js'); module.exports = [ { method: 'GET', path: '/info/all', config: { handler: infoCtrl.getAll } } ];
"use strict"; /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=Study.js.map
'use strict'; const express = require('express'); const path = require('path'); const logger = require('morgan'); const cookieParser = require('cookie-parser'); const bodyParser = require('body-parser'); const cons = require('consolidate'); const session = require('express-session'); const mysql = require('mysql'); const index = require('./routes/index'); const users = require('./routes/users'); const signup = require('./routes/signup'); const savequestion = require('./routes/savequestion'); const questions = require('./routes/questions'); const questionbyid = require('./routes/questionbyid'); const saveanswer = require('./routes/saveanswer'); const login = require('./routes/login'); const logout = require('./routes/logout'); const downvote = require('./routes/downvote'); const upvote = require('./routes/upvote'); const app = express(); const config = require('./config'); console.log(`Run at ${ process.env.NODE_ENV}`); const con = mysql.createConnection(config.MYSQL); con.connect((err) => { if (err) { throw err; } console.log('Connected to database'); }); const sess = { secret: 'awhdRkRSKSLSIEHGugdYdfd' }; app.use(session(sess)); // view engine setup app.engine('html', cons.swig); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'html'); // uncomment after placing your favicon in /public //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', index); app.use('/users', users); app.use('/login', login); app.use('/savequestion', savequestion); app.use('/questions', questions); app.use('/questionbyid', questionbyid); app.use('/saveanswer', saveanswer); app.use('/signup', signup); app.use('/logout', logout); app.use('/downvote', downvote); app.use('/upvote', upvote); // catch 404 and forward to error handler app.use((req, res, next) => { const err = new Error('Not Found'); err.status = 404; next(err); }); // Author Narendra Kumawat app.use((err, req, res, next) => { res.locals.message = err.message; res.locals.error = req.app.get('env') === 'development' ? err : {}; res.status(err.status || 500); res.render('error'); }); module.exports = app;
Products = new Mongo.Collection('products'); Cart = new Mongo.Collection('cart'); Orders = new Mongo.Collection('orders'); Categories = new Mongo.Collection('categories');
/* Check for Checks Jesse Allison 2015 */ var checkDict = new Dict('recentChecks'); var ajaxreq; function bang() { var all_the_checks = checkDict.get('body'); post(all_the_checks.length); } function updateChecks() { ajaxreq = new XMLHttpRequest(); ajaxreq.open("GET","https://data.brla.gov/resource/g5c2-myyj.json"); ajaxreq.onreadystatechange = checksLoaded; ajaxreq.send(); } function checksLoaded() { post("loading"); if (this.readyState ==4){ var obj = JSON.parse(this.responseText); post("Object Returned: "+ obj); checkDict.setparse("body",this.responseText); post("Dictionary "+checkDict); } } function checkAmounts() { var all_the_checks = checkDict.get('body'); for(var i=0; i < all_the_checks.length; i++) { var paymentDict = new Dict(all_the_checks[i]); var payment2 = paymentDict.get('gross_pay'); debugDict.parse(paymentDict); var searchString = "body["+i+"]::gross_pay"; // body[0]::gross_pay var payment = checkDict.get(searchString); outlet(0, payment); } }
var searchData= [ ['handle',['HANDLE',['../wglew_8h.html#aa1efb7b85228601549d183556de19dfc',1,'wglew.h']]], ['hdc',['HDC',['../wglew_8h.html#a7b84f5391331438359747d138a86ffe3',1,'wglew.h']]], ['hglrc',['HGLRC',['../wglew_8h.html#a79abb55a8f5ce093fad0358132a376e4',1,'wglew.h']]], ['hpbufferarb',['HPBUFFERARB',['../wglew_8h.html#a90ca6f3efc25075502afda6d38df143b',1,'wglew.h']]], ['hpbufferext',['HPBUFFEREXT',['../wglew_8h.html#a9a3e24dd9ba635197a508013c122d1d1',1,'wglew.h']]] ];
/* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @author: nesterone * @version: $Id: ChartComponentModel.js 47331 2014-07-18 09:13:06Z kklein $ */ define(function (require) { "use strict"; var BaseComponentModel = require("./BaseComponentModel"), jiveTypes = require("../enum/jiveTypes"), interactiveComponentTypes = require("../enum/interactiveComponentTypes"), _ = require("underscore"), reportEvents = require("../../enum/reportEvents"), reportCreators = require("../../enum/reportCreators"); return BaseComponentModel.extend({ defaults: function() { return { charttype: undefined, datetimeSupported: false, hcinstancedata: undefined, id: undefined, interactive: true, module: "jive.highcharts", type: jiveTypes.CHART, uimodule: "jive.interactive.highchart" }; }, api: { changeType: {} }, actions: { "change:charttype": function() { return { actionName: 'changeChartType', changeChartTypeData: { chartComponentUuid: this.get("id"), chartType: this.get("charttype") } } } }, initialize: function(){ if (this.has("hcinstancedata")){ var hcinstancedata = this.get("hcinstancedata"), creator = this._detectCreator(hcinstancedata); if (reportCreators.AD_HOC_DESIGNER === creator){ //workaround to stretch adhoc's delete hcinstancedata.width; delete hcinstancedata.height; } } // JSON.parse(JSON.stringify(.... deep clone. // JR services are changing model by initialization, therefore deep clone is done to avoid data corruption // should be replaced with true deep clone if JRS-1450 implemented this.config = JSON.parse(JSON.stringify(this.toJSON())); }, showTypeError: function() { this.get("uiModuleType").showTypeError(); }, changeType: function(parms) { this.trigger(reportEvents.ACTION, { actionName: 'changeChartType', changeChartTypeData: { chartComponentUuid: this.config.id, chartType: parms.type } }); }, _detectCreator: function(hcInstance){ var services = hcInstance.services, isCreatedFromAdhoc = _.some(services, function (info) { return info.service.indexOf("adhoc") != -1; }), creator; if (isCreatedFromAdhoc) { creator = reportCreators.AD_HOC_DESIGNER; } if (creator){ this.set("creator", creator); } return creator; }, toReportComponentObject: function() { if (!this.get("interactive")) { return undefined; } return { id: this.get("id"), componentType: interactiveComponentTypes.CHART, chartType: this.get("charttype"), name: this.get("name") }; }, updateFromReportComponentObject: function(obj) { this.set({ charttype: obj.chartType }); } }); });
import Vue from 'vue'; import Router from 'vue-router'; import StoryManager from './views/StoryManager.vue'; import StoryView from './views/StoryView.vue'; Vue.use(Router); export default new Router({ routes: [ { path: '/', name: 'home', component: StoryManager }, { path: '/story/:story', name: 'homeStory', component: StoryView }, { path: '/story/:story/:scene', name: 'story', component: StoryView }, { path: '/about', name: 'about', // route level code-splitting // this generates a separate chunk (about.[hash].js) for this route // which is lazy-loaded when the route is visited. component: () => import(/* webpackChunkName: "about" */ './views/About.vue') } ] });
// UK lang variables tinyMCE.addI18n('en.pastecode',{ paste_code_desc : _('Insert HTML code as text'), paste_code_title : _('Use CTRL+V on your keyboard to paste the code into the window.'), paste_html_desc : _('Paste HTML fragment (embed code)'), paste_html_title : _('Use CTRL+V on your keyboard to paste the code into the window.'), paste_include_wrapper : _('Include wrapper (improves presentation)'), highlight_syntax : _('Highlight syntax'), options : _('Options'), language : _('Markup language'), language_missing : _('Please select a language'), not_defined : _('-- Not Set --'), markup : _('Markup (HTML, etc.)'), c_type : _('C type'), presentation : _('Appearance'), presentation_bright : _('Light'), presentation_dark : _('Dark'), line_numbers : _('Line numbers'), line_highlight : _('Line highlight'), example : _('Example') });
/*global describe, it */ define( ["underscore", "jquery", "utils/date"], function (_, $, date) { describe("date", function () { describe("formatYearAsTimestamp", function () { it("should pad the year so it is 4 digits when the year is < 100AD", function () { date.formatYearAsTimestamp(99, "").should.equal("0099"); }); it("should pad the year so it is 4 digits when the year is < 1000AD", function () { date.formatYearAsTimestamp(999, "").should.equal("0999"); }); it("should format the year appropriately when it is BC", function () { date.formatYearAsTimestamp(-48, "").should.equal("0048 BC"); }); }); }); } );
import is from 'is'; // eslint-disable-next-line import/prefer-default-export export const validNumber = (num, min, max) => { if (is.number(min)) { // Make sure the new value isn't less than the min value. if (num < Number(min)) { return{ showError: true, errorMsg: `Please enter a valid number greater than or equal to ${min}.` }; } } if (is.number(max)) { if (num > Number(max)) { return{ showError: true, errorMsg: `Please enter a valid number less than or equal to ${max}.` }; } } return{ showError: false, errorMsg: '' }; };
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { EuiSuggestItem } from './suggest_item'; import { EuiSuggestInput } from './suggest_input'; export class EuiSuggest extends Component { state = { value: '', status: 'unsaved' }; getValue = val => { this.setState({ value: val }); }; onChange = e => { this.props.onInputChange(e.target.value); }; render() { const { onItemClick, onInputChange, status, append, tooltipContent, suggestions, ...rest } = this.props; const suggestionList = suggestions.map((item, index) => ( <EuiSuggestItem type={item.type} key={index} label={item.label} onClick={onItemClick ? () => onItemClick(item) : null} description={item.description} /> )); const suggestInput = ( <EuiSuggestInput status={status} tooltipContent={tooltipContent} append={append} sendValue={this.getValue} suggestions={suggestionList} {...rest} /> ); return <div onChange={this.onChange}>{suggestInput}</div>; } } EuiSuggest.propTypes = { className: PropTypes.string, /** * Status of the current query 'notYetSaved', 'saved', 'unchanged' or 'loading'. */ status: PropTypes.oneOf(['unsaved', 'saved', 'unchanged', 'loading']), tooltipContent: PropTypes.string, /** * Element to be appended to the input bar (e.g. hashtag popover). */ append: PropTypes.node, /** * List of suggestions to display using 'suggestItem'. */ suggestions: PropTypes.array, /** * Handler for click on a suggestItem. */ onItemClick: PropTypes.func, onInputChange: PropTypes.func, isOpen: PropTypes.bool, onClosePopover: PropTypes.func, onPopoverFocus: PropTypes.func }; EuiSuggestInput.defaultProps = { status: 'unchanged' };
function featured_thumb(){ jQuery('ul.thumbnails').each(function(index, element) { var get_class=jQuery(this).attr('class'); var get_parent=jQuery(this).closest('div'); var wt=jQuery(this).closest('div').width();//width total var col=jQuery(this).attr('data-columns');//columns var dt=Math.floor(wt/col); var mt=6; var wa=dt-mt; var mg=3; var ft_size=jQuery(this).attr('data-ftsize'); jQuery(this).css('font-size',ft_size+'px'); get_parent.find('ul.thumbnails li').css({'max-width':wa+'px','margin':mg+'px','padding':'0'}); get_parent.find('ul.thumbnails li h5').css({'font-size':ft_size+'px','font-weight':'bold','padding':'0 0 5px','margin':'0'}); get_parent.find('ul.thumbnails li img').css({'height':wa+'px','margin':'0'}); get_parent.find('ul.thumbnails li p').css({'margin':'0'}); }); } window.onload = featured_thumb;
jQuery(window).bind('load', function() { jQuery('.foreground').toggle('slow'); }); jQuery(function() { jQuery('.view-portfolio .views-field-field-portfolio-image a').hide(); }); jQuery(window).bind('load', function() { var i = 1; var imgs = jQuery('.view-portfolio .views-field-field-portfolio-image a').length; var int = setInterval(function() { //console.log(i); check to make sure interval properly stops if(i >= imgs) clearInterval(int); jQuery('.view-portfolio .views-field-field-portfolio-image a:hidden').eq(0).fadeIn(300); i++; }, 300); });
var url = require('url'); var urlStr = 'http://www.smartisan.com/jianguopro/?name=t2&price=1499#overview'; // var result = url.parse(urlStr); var result = url.parse(urlStr, true, true); console.log(result);
var test = require('tape'); var equal = require('../'); test('NaN and 0 values', function (t) { t.ok(equal(NaN, NaN)); t.notOk(equal(0, NaN)); t.ok(equal(0, 0)); t.notOk(equal(0, 1)); t.end(); }); test('nested NaN values', function (t) { t.ok(equal([ NaN, 1, NaN ], [ NaN, 1, NaN ])); t.end(); });
"use strict"; var _ = require("lodash"); var Base = require("./Base"); var User = require("./User"); var UpdateMixin = require("./UpdateMixin"); /** * Ticket handler model for the client * * @namespace models.client * @class Handler * @extends models.client.Base * @uses models.client.UpdateMixin */ var Handler = Base.extend({ defaults: function() { return { type: "handlers", createdAt: new Date().toString() }; }, relationsMap: function() { return { handler: User }; }, url: function() { if (this.isNew()) return this.parent.url() + "/handlers"; return _.result(this.parent, "url") + "/handlers/" + this.get("handledById"); }, /** * Return the handler user object * * @method getUser * @return {models.client.User} */ getUser: function(){ return this.rel("handler"); }, }); _.extend(Handler.prototype, UpdateMixin); module.exports = Handler;
module.exports = function(gulp, plugins, paths){ return plugins.shell.task("node "+paths.build+"/index.js --production"); };
/** * $Id: sites/all/libraries/tinymce/jscripts/tiny_mce/utils/editable_selects.js 1.3 2010/02/18 14:49:08EST Linda M. Williams (WILLIAMSLM) Production $ * * Makes select boxes editable. * * @author Moxiecode * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. */ var TinyMCE_EditableSelects = { editSelectElm : null, init : function() { var nl = document.getElementsByTagName("select"), i, d = document, o; for (i=0; i<nl.length; i++) { if (nl[i].className.indexOf('mceEditableSelect') != -1) { o = new Option('(value)', '__mce_add_custom__'); o.className = 'mceAddSelectValue'; nl[i].options[nl[i].options.length] = o; nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect; } } }, onChangeEditableSelect : function(e) { var d = document, ne, se = window.event ? window.event.srcElement : e.target; if (se.options[se.selectedIndex].value == '__mce_add_custom__') { ne = d.createElement("input"); ne.id = se.id + "_custom"; ne.name = se.name + "_custom"; ne.type = "text"; ne.style.width = se.offsetWidth + 'px'; se.parentNode.insertBefore(ne, se); se.style.display = 'none'; ne.focus(); ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput; ne.onkeydown = TinyMCE_EditableSelects.onKeyDown; TinyMCE_EditableSelects.editSelectElm = se; } }, onBlurEditableSelectInput : function() { var se = TinyMCE_EditableSelects.editSelectElm; if (se) { if (se.previousSibling.value != '') { addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value); selectByValue(document.forms[0], se.id, se.previousSibling.value); } else selectByValue(document.forms[0], se.id, ''); se.style.display = 'inline'; se.parentNode.removeChild(se.previousSibling); TinyMCE_EditableSelects.editSelectElm = null; } }, onKeyDown : function(e) { e = e || window.event; if (e.keyCode == 13) TinyMCE_EditableSelects.onBlurEditableSelectInput(); } };
/** * $Id: sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js 1.3 2010/02/18 14:48:59EST Linda M. Williams (WILLIAMSLM) Production $ * * @author Moxiecode * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. */ (function() { tinymce.create('tinymce.plugins.VisualChars', { init : function(ed, url) { var t = this; t.editor = ed; // Register commands ed.addCommand('mceVisualChars', t._toggleVisualChars, t); // Register buttons ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); ed.onBeforeGetContent.add(function(ed, o) { if (t.state) { t.state = true; t._toggleVisualChars(); } }); }, getInfo : function() { return { longname : 'Visual characters', author : 'Moxiecode Systems AB', authorurl : 'http://tinymce.moxiecode.com', infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars', version : tinymce.majorVersion + "." + tinymce.minorVersion }; }, // Private methods _toggleVisualChars : function() { var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo; t.state = !t.state; ed.controlManager.setActive('visualchars', t.state); if (t.state) { nl = []; tinymce.walk(b, function(n) { if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) nl.push(n); }, 'childNodes'); for (i=0; i<nl.length; i++) { nv = nl[i].nodeValue; nv = nv.replace(/(\u00a0+)/g, '<span class="mceItemHidden mceVisualNbsp">$1</span>'); nv = nv.replace(/\u00a0/g, '\u00b7'); ed.dom.setOuterHTML(nl[i], nv, d); } } else { nl = tinymce.grep(ed.dom.select('span', b), function(n) { return ed.dom.hasClass(n, 'mceVisualNbsp'); }); for (i=0; i<nl.length; i++) ed.dom.setOuterHTML(nl[i], nl[i].innerHTML.replace(/(&middot;|\u00b7)/g, '&nbsp;'), d); } } }); // Register plugin tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars); })();
var app = require('../../app'); var boards = require('../controllers/boards'); app.get('/api/boards', boards.get);
const gulp = require('gulp'), rename = require('gulp-rename'), sketch = require('gulp-sketch'), iconfont = require('gulp-iconfont'), imagemin = require('gulp-imagemin'), consolidate = require('gulp-consolidate') /** * Font settings */ const // set name of your symbol font fontName = 'floating-top-link', // set class name in your CSS className = 'FloatingTopLink__icon', // you can also choose 'foundation-style' template = 'fontawesome-style', // you can also choose 'symbol-font-16px.sketch' skethcFileName = 'floating-top-link-font-14px.sketch' /** * Recommended to get consistent builds when watching files * See https://github.com/nfroidure/gulp-iconfont */ const timestamp = Math.round(Date.now() / 1000) gulp.task('symbols', () => gulp.src(skethcFileName) .pipe(sketch({ export: 'artboards', formats: 'svg' })) .pipe(imagemin()) .pipe(iconfont({ fontName, formats: ['ttf', 'eot', 'woff', 'woff2', 'svg'], timestamp, log: () => {} // suppress unnecessary logging })) .on('glyphs', (glyphs) => { const options = { className, fontName, fontPath: '../fonts/', // set path to font (from your CSS file if relative) glyphs: glyphs.map(mapGlyphs) } gulp.src(`templates/${ template }.css`) .pipe(consolidate('lodash', options)) .pipe(rename({ basename: fontName })) .pipe(gulp.dest('./css/')) // set path to export your CSS // if you don't need sample.html, remove next 4 lines gulp.src(`templates/${ template }.html`) .pipe(consolidate('lodash', options)) .pipe(rename({ basename: 'sample' })) .pipe(gulp.dest('./')) // set path to export your sample HTML }) .pipe(gulp.dest('../fonts/')) // set path to export your fonts ) gulp.task('watch', () => gulp.watch('*.sketch', ['symbols'])) /** * This is needed for mapping glyphs and codepoints. */ function mapGlyphs(glyph) { return { name: glyph.name, codepoint: glyph.unicode[0].charCodeAt(0) } }
/* Sapling pagelink dialog */ CKEDITOR.dialog.add( 'embed', function( editor ) { var plugin = CKEDITOR.plugins.embed; var pagelink_plugin = CKEDITOR.plugins.pagelink; return { title : 'Embed media', minWidth : 300, minHeight : 150, contents : [ { id : 'info', label : 'Embed media', title : 'Embed media', elements : [ { type : 'textarea', id : 'code', label : 'Paste the embed code below:', required: true, validate : function() { var dialog = this.getDialog(); var func = CKEDITOR.dialog.validate.notEmpty( 'Please enter the embed code' ); return func.apply( this ); }, setup : function( data ) { if ( data.code ) this.setValue( data.code ); }, commit : function( data ) { data.code = this.getValue(); } } ] } ], onShow : function() { var editor = this.getParentEditor(), selection = editor.getSelection(), element = null, data = { code : '' }; if ( ( element = selection.getStartElement() ) && element.is( 'span' ) ) selection.selectElement( element ); else element = null; if( element ) { this._.selectedElement = element; data.code = $(element.$).text(); } this.setupContent( data ); }, onOk : function() { var attributes = {}, data = {}, me = this, editor = this.getParentEditor(); this.commitContent( data ); attributes['class'] = 'plugin embed'; var style = []; var node = $(data.code), width = node.attr('width'), height = node.attr('height'); if(width) style.push('width: ' + width + 'px;'); if(height) style.push('height: ' + height + 'px;'); if(style.length) attributes['style'] = style.join(' '); if ( !this._.selectedElement ) { if(jQuery.trim(data.code) == '') return; // Create element if current selection is collapsed. var selection = editor.getSelection(), ranges = selection.getRanges( true ); var text = new CKEDITOR.dom.text( data.code, editor.document ); ranges[0].insertNode( text ); ranges[0].selectNodeContents( text ); selection.selectRanges( ranges ); // Apply style. var style = new CKEDITOR.style( { element : 'span', attributes : attributes } ); style.apply( editor.document ); var selected = selection.getStartElement(); ranges[0].setStartAfter( selected ); ranges[0].setEndAfter( selected ); selection.selectRanges( ranges ); } else { // We're only editing an existing link, so just overwrite the attributes. var element = this._.selectedElement; element.setAttributes( attributes ); element.setText( data.code ); } }, onLoad : function() { }, // Inital focus on 'url' field if link is of type URL. onFocus : function() { var pageField = this.getContentElement( 'info', 'code' ); pageField.select(); } }; });
//@ sourceMappingURL=payment_method_nonce.map // Generated by CoffeeScript 1.6.1 var AttributeSetter, PaymentMethodNonce, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; AttributeSetter = require('./attribute_setter').AttributeSetter; PaymentMethodNonce = (function(_super) { __extends(PaymentMethodNonce, _super); function PaymentMethodNonce() { return PaymentMethodNonce.__super__.constructor.apply(this, arguments); } return PaymentMethodNonce; })(AttributeSetter); exports.PaymentMethodNonce = PaymentMethodNonce;
export * from './get_ldap'; export * from './jwt_verify'; export * from './auth'; export * from './post_snow';
/* * Lupus in Tabula * ...un progetto di Edoardo Morassutto * Contributors: * - 2014 Edoardo Morassutto <edoardo.morassutto@gmail.com> */ var path = ""; var APIdir = path + "/api"; var errorCount = 0; var lastError = 0; var lastNotificationUpdate = null; function logout() { $.ajax({ url: APIdir+"/logout", type: "GET", dataType: "json", async: false, success: function() { window.location.href = path + "/login"; }, error: function(e) { window.location.href = path + "/login"; } }); } function isShortName(name) { var regex = /^[a-zA-Z][a-zA-Z0-9]{0,9}$/; return regex.test(name); } function isValidDescr(descr) { var regex = /^[a-zA-Z0-9][a-zA-Z0-9 ]{0,43}[a-zA-Z0-9]$/; return regex.test(descr); } function showError(message) { var div = $("<div>") .addClass("alert") .addClass("alert-danger") .addClass("alert-dismissable") .attr("id", "error-"+(errorCount++)); div.append('<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'); div.append(message.error); $("nav.navbar").after(div); setTimeout(removeError, 2000); } function getErrorMessage(jqError) { try { return JSON.parse(jqError.responseText); } catch (e) { return JSON.stringify(jqError); } } function removeError() { $("#error-"+(lastError++)).fadeTo(500, 0).slideUp(500, function(){ $(this).remove(); }); } function removeNotification() { var $this = $(this); var id_notification = $this.attr('data-id-notification'); $.ajax({ url: APIdir + "/notification/dismiss", data: { id_notification: id_notification }, dataType: 'json', type: 'POST', success: function(data) { $this.closest('.notification-element').remove(); if ($('.notification-element').length == 0) $('.dropdown-menu').append("<p id='notifications-empty'>Nessuna notifica recente...</p>"); }, error: function(error) { console.error(error); showError(getErrorMessage(error)); } }); return false; } function refreshNotifications() { $.ajax({ url: APIdir + "/notification/update", data: { since: lastNotificationUpdate }, dataType: 'json', type: 'GET', success: function (data) { lastNotificationUpdate = new Date(); appendNotifications(data); }, error: function (error) { console.error(error); showError(getErrorMessage(error)); } }); return false; } function appendNotifications(list) { if (list.length == 0) return; var $notifications = $("#notifications .dropdown-menu"); $("#notifications-empty").remove(); while (list.length) { var noti = list.pop(); var $noti = $("<a href='"+noti.link+"' class='notification-element'>"); $noti.append( $('<div class="btn-dismiss-notification" data-id-notification="'+noti.id_notification+'">') .append('<div class="glyphicon glyphicon-remove"></div>') .click(removeNotification) ); $noti.append(noti.message); $noti.insertAfter("#notifications-title"); } } $(function() { if (location.pathname != path + "/login") { $(".btn-dismiss-notification").click(removeNotification); $("#notifications-refresh").click(refreshNotifications); $("#notifications-toggle").dropdown(); $("#notifications").on("show.bs.dropdown", function () { refreshNotifications(); }); refreshNotifications(); } });
showWord(["n. ","Gratèl, lagratèl, maladi po ki atrapan; maladi po ki bay pi. Tretman gal fasil. 2. Enfeksyon nan plant." ])
module.exports = { "methods": { "wiki": function(msg, sender, api) { var query = msg.match(/\".+\"/)[0]; query = query.substring(1, query.length-1); var base = "http://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&rawcontinue&redirects&titles="+encodeURIComponent(query); api.request(base, function(err, res, body) { var info = JSON.parse(body); var page; for (f in info.query.pages) { page = info.query.pages[f]; } if (page.missing === undefined) { var text; var testpos = 0; while (true) { var pos = page.extract.indexOf(".", testpos); if (pos === -1) { api.randomMessage("oddresult", {"query": query}); return; } text = page.extract.substr(0, pos+1); var bstart = text.lastIndexOf("<b>"); var bend = text.lastIndexOf("</b>"); if (bstart < bend || (bstart === -1 && bend === -1)) break; testpos = pos + 1; } text = text.replace(/<\/?[^>]+(>|$)/g, ""); if (text.indexOf("\n") > 0) text = text.substr(0, text.indexOf("\n")); else if (text.indexOf("\n") === 0) text = text.substr(1); if (text.length === text.lastIndexOf("may refer to:") + 13) { api.randomMessage("oddresult", {"query": query}); return; } api.say(text); } else { api.randomMessage("nodefs", {"query": query}); } }); } } }
define("jquery-plugin/cookie/1.3/cookie", ["$"], function (require, exports, module) { var jQuery = require('$'); /*! * jQuery Cookie Plugin v1.3 * https://github.com/carhartl/jquery-cookie * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 */ (function ($, document, undefined) { var pluses = /\+/g; function raw(s) { return s; } function decoded(s) { return decodeURIComponent(s.replace(pluses, ' ')); } var config = $.cookie = function (key, value, options) { // write if (value !== undefined) { options = $.extend({}, config.defaults, options); if (value === null) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = config.json ? JSON.stringify(value) : String(value); return (document.cookie = [ encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // read var decode = config.raw ? raw : decoded; var cookies = document.cookie.split('; '); for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies[i].split('='); if (decode(parts.shift()) === key) { var cookie = decode(parts.join('=')); return config.json ? JSON.parse(cookie) : cookie; } } return null; }; config.defaults = {}; $.removeCookie = function (key, options) { if ($.cookie(key) !== null) { $.cookie(key, null, options); return true; } return false; }; })(jQuery, document); })
'use strict'; module.exports = function(sequelize, DataTypes){ var Order = sequelize.define('Order', { state: { type: DataTypes.ENUM('active', 'purchased', 'cancelled') } }, { classMethods: { associate: function(models){ Order.belongsTo(models.User); Order.belongsTo(models.Listing); } } }); return Order; };
var pkg = require([__dirname, "..", "package"].join("/")); var _ = require("lodash"); var yargs = require("yargs"); var commands = require([__dirname, "commands"].join("/")); module.exports = { initialize: function(options){ var options = _.merge(options, { version: { describe: "Print the Cuisine version" } }); yargs.help("help"); yargs.version(pkg.version, "version"); yargs.options(options).argv; }, run: function(command){ if(_.has(commands, command)){ this.initialize(commands[command].options); commands[command].execute(yargs.argv); } else{ this.initialize({}); console.log(["Subcommand ", command, " not found!"].join("'")) } } }
(function() { 'use strict'; angular.module('bonitasoft.ui.filters') .filter('lazyRef',function($log) { return function toLazyRef(bo,rel) { if(bo){ if(bo.links){ var result = bo.links.filter((ref) => ref.rel === rel); if(result[0] && result[0].href){ return '..' + result[0].href; } $log.warn('No lazy relation ',rel,' found'); } } return undefined; }; }); })();
Ext.define('ExtJsMVC.model.cursus.RootCursusModel', { extend : 'Ext.data.TreeModel', fields : [ {name: 'itemId'}, {name: 'name'} ], childType : 'ExtJsMVC.model.cursus.CursusModel' });
showWord(["n. "," Nan konstriksyon lari, twou kote dlo desann anba tè. Twou rego sa a bouche." ])