Skip to content

Instantly share code, notes, and snippets.

View a-ignatov-parc's full-sized avatar

Anton Ignatov a-ignatov-parc

View GitHub Profile
for (var route in this.routes) {
var regData = reg.exec(route);
if (regData && !bindedList[regData[0]]) {
this.bind('route:' + regData[0], function() {
this.context.trigger('route.changed', this.route);
}.bind({
context: this,
route: regData[0]
}));
bindedList[regData[0]] = YES;
<Control>
<Enabled>true</Enabled>
<ID>devDate[0]</ID>
<Name>devDate</Name>
<Number>0</Number>
<Visible>true</Visible>
<Colspan>1</Colspan>
<ControlType>DateTime</ControlType>
<Data>
<Values>
.scrollable {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
<div class="b-step_container b-slide_down-container b-step_container--<%= ItemsList.contentClass || 'car' %> g-hidden">
<div class="b-slide_down-target g-clrfix">
<%
var count = 0,
columnShift = 0,
ColumnCount = ItemsList.columnsCount || 6,
columns = [],
columnsCounter = 0,
ColumnsList = ItemsList.value || [],
CarID = 0;
routes: {
'': 'index',
'edit': 'edit',
'index': 'index',
'index/:params': 'index',
'form': 'options',
':page': 'processWrongRoute'
},
initialize: function(initData) {
@a-ignatov-parc
a-ignatov-parc / gist:2042154
Created March 15, 2012 05:28
Fisher–Yates Shuffle
function shuffle(array) {
var m = array.length,
t,
i;
while (m) {
i = Math.floor(Math.random() * m--);
t = array[m];
array[m] = array[i];
array[i] = t;
// Проставляем во вью имя бандла к которому она относится.
// Необходимо для работы метода .unload() внутри вью.
if (data._view != null) {
data._view.prototype.__super = this;
data._view.prototype.__bundleName = name;
}
<script type="text/javascript">
$(function() {
Rens.container = $('.l-wrapper');
Rens.init({
Profile: {
isRegistered: YES,
isSignedIn: NO,
isRedirected: YES,
isFilled: YES,
FirstName: null,
{
enName: '',
ruName: '',
images: {
front: '',
rear: '',
left: '',
...
},
Plca
.set('Hotels')
.set('OtherHotels', {
view: Plca.Views.Hotels,
dataSource: 'Hotels'
});