Pilot v1.3.0: access permission for "route"

Finally got around to Pilot. Now you can set the access rights for the route, all very comfortable and intuitive.

http://rubaxa.github.io/Pilot/?#ru/Pilot.Route.accessPermission

A noisy background

/**
 * @param  {HTMLElement}  el    target element
 * @param  {String}      color       background color
 * @param  {Number}   width      noise pattern width
 * @param  {Number}   height     noise pattern height
 * @param   {Number}   opacity    noise opacity
 */
function setNoiseBackground(el, color, width, height, opacity){
var canvas   = document.createElement("canvas");
  var context  = canvas.getContext("2d");

canvas.width = width;
canvas.height = height;

for( var i = 0; i < width; i++ ){
  for( var j = 0; j < height; j++ ){
    var val = Math.floor(Math.random() * 255);
    context.fillStyle = "rgba(" + val + "," + val + "," + val + "," + opacity + ")";
    context.fillRect(i, j, 1, 1);
  }
}

el.style.backgroundColor = color;
el.style.backgroundImage = "url(" + canvas.toDataURL("image/png") + ")";
}

// Usage
setNoiseBackground(document.body, "#F4F5EC", 50, 50, 0.01);

Simple. Easy. Quickly.


Полностью переработан движок, компиляция стала быстрей (в разы), улучшен биндинг, разработан альтернативный синтаксис и ещё много чего!

jQuery.FileAPI — v0.1.0

jQuery plugin для FileAPI, умеет:

  1. Грузить сразу много файлов, либо по одному
  2. Загружать изображения и обрабатывать их на клиенте (например кроп)
  3. Гибкие настройки (их очень много)
  4. Это очень крутая штука

Demo — rubaxa.github.io/jquery.fileapi/
GitHub — https://github.com/RubaXa/jquery.fileapi/

Возможностей и правду много, посмотрите примеры, вам понравится.


P.S. Есть возможность сделать снимок с помощью WebCamera, кадрировать, повернуть и  всё это на клиенте, с поддержкой старых браузеров, а результат загрузить на сервер.

xtpl: первые наброски полноценного синтаксиса


1. Цветовая схема — http://t.co/zz7nixbVMZ
2. Теги и управляющие конструкции — http://t.co/MoEbaxHc1k
3. Атрибуты — http://t.co/us7Co4coIE
4. События — http://t.co/nrDJiUPOZ8

Pilot: v1.2.0

New features


  • req — now the instance of Pilot.Request.
  • Added Pilot.utils
    • each(el/**Object|Array*/, fn/**Function*/[, thisArg/**Mixed*/])
    • extend(a/**Object*/, b/**Object*/)/**Object*/
    • qs.parse(queryString/**String*/)/**Object*/
    • qs.stringify(params/**Object*/)/**String*/
http://rubaxa.github.io/Pilot/

jQuery extension, add support `scrollstart` and `scrollend` events.


/**

 * @flags
 * $.isScrolled; // boolean
 *
 * @binding
 * $(window).bind('scrollstart scrollend', function (evt){
 *     if( evt.type == 'scrollstart' ){
 *         // logic
 *     }
 * });
 */
https://gist.github.com/RubaXa/5569075

Pilot: Now in English

Multifunctional JavaScript router solves the problem of routing your application, providing full control over the route. It can work either by itself or as a part of other framework, such as Backbone, in which it could be an excellent substitute for the standard Backbone.Router and even Backbone.View. Just try it.


npm — https://npmjs.org/package/pilotjs

GitHub — https://github.com/RubaXa/Pilot
Documentation — http://rubaxa.github.com/Pilot/#en/

Все проще, чем кажется

function foo(el/**Mixed*/){
    if( el && el.jquery ){
        // это jQuery коллекция
        el = el[0];
    }

   /*__*/

}