This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.5) | |
// Compass (v1.0.0.alpha.18) | |
// Bourbon (v3.2.0.beta.1.a) | |
// ---- | |
@import "bourbon/bourbon"; | |
body { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('remoteForm', function($http){ | |
function link(scope, formElement, attrs, formController) { | |
scope.input = {}; | |
scope.submit = function (){ | |
$http.post(attrs.remoteForm, scope.input) | |
.success(function(data, status, headers, config) { | |
// $window.location.reload(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form remote-form="/accounts/register/" class="register pull-left"> | |
<h3>Регистрация</h3> | |
<div ng-repeat="error in errors.non_field_errors" class="alert alert-danger fade in"> | |
{{ error }} | |
</div> | |
<div class="form-group"> | |
<label>Имя</label> | |
<input remote-form-control="input.first_name" type="text" name="first_name" class="form-control"/> | |
</div> | |
<div class="form-group"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Expose jQuery as an AMD module, but only for AMD loaders that | |
// understand the issues with loading multiple versions of jQuery | |
// in a page that all might call define(). The loader will indicate | |
// they have special allowances for multiple jQuery versions by | |
// specifying define.amd.jQuery = true. Register as a named module, | |
// since jQuery can be concatenated with other files that may use define, | |
// but not use a proper concatenation script that understands anonymous | |
// AMD modules. A named AMD is safest and most robust way to register. | |
// Lowercase jquery is used because AMD module names are derived from | |
// file names, and jQuery is normally delivered in a lowercase file name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Timer on Deferreds | |
(function (){ | |
var top = this; | |
var defaults = { | |
granularity : 500, | |
name : 'default' | |
}; | |
this.Timer = function(timeout, options){ | |
var o = $.extend({}, defaults, options), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wordpress_root/wp-content/plugins/thinkup-panels/widgets-builder/animation/js/thinkup-builder-tinymce-widget.dev.js?ver=2.4.4 | |
Exception origin: | |
https://gyazo.com/05ebdd67e8a50d95785e23d25686df68 | |
Console readout & prior conditions: | |
https://gyazo.com/d10cb7e3f89e2a808a2589698f0a7ce3 | |
Error stack: | |
https://gyazo.com/e1ed015033fd86542cc1eb34fe6a3982 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const KEYS = { | |
key: 'k', | |
invoked: 'i', | |
fulfilled: 'f', | |
depsOn: 'd', | |
notify: 'n' | |
}; | |
function ackProducer(handle, { hashMap = {}, lastKey = null } = {}, diag) { | |
const state = { hashMap, lastKey }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Как вы привязываете логику приложения к срабатыванию какого-то действия (action, FSA)? | |
Вот, к примеру, приложение получило от сервера пакет элементов. Понятно, что есть редьюсер, | |
который эти элементы сложит куда-то; может, даже взведёт какой-то флаг, что, мол, данные | |
получены. И какой-то компонент даже отрисует их. | |
Но вот живет в приложении какая-то другая сущность, которая, должна сделать какую-то трансформацию | |
над элементами и принять решение, надо ли еще совершать какие-то действия (подгрузить новую порцию, | |
обновить флаги в профиле пользователя и тп). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* common react, redux staff here | |
*/ | |
import {Router, createRoutes} from 'react-router'; | |
import createBrowserHistory from 'history/lib/createBrowserHistory'; | |
import rawRoutes from './routes'; | |
import store from './store'; | |
function mixStoreToRoutes(routes) { | |
return routes && routes.map(route => ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function($) { | |
$.fn.uploadFile = function(options) { | |
ajaxFileUpload(this.filter(':file'), options); | |
return this; | |
}; | |
function ajaxFileUpload(elements, s) { |
OlderNewer