Skip to content

Instantly share code, notes, and snippets.

View Inviz's full-sized avatar

Yaroslaff Fedin Inviz

View GitHub Profile
SlidingCanvas = new Class({
Implements: [Options, Events],
options: {
history: true,
suffix: '-page'
},
initialize: function(wrapper, pageWrapper, options) {
1) Язычок должен быть слева, сразу после закругления. Смотреть он должен вниз ровно на пиксель, на который было даблкликнуто. Если возможно, то в случаях когда аннотация позиционируется сбоку экрана, то при том что прямоугольник должен не вылазить за пределы страницы, но язычок должен указывать все-таки на нужное место. Пример:
__________________________________
| _____________ |
| | | |
| |_____________| |
| v |
|______________x___________________|
__________________________________
| _____________ |
@Inviz
Inviz / Traits.js
Created March 28, 2009 00:29
Load class portions on demand with Traits. Keeps stuff clean
//like multiple Extend
Class.Mutators.Inherits = function(self, klasses){
$splat(klasses).each(function(klass){
Class.prototyping = klass.prototype;
var subclass = new klass;
delete subclass.parent;
self = Class.inherit(self.prototype || self, subclass)
delete Class.prototyping;
});
return self;
//3d party multipurpose libs
register('inflections', '/javascripts/vendor/jester/inflections.js')
register('mimeparse', '/javascripts/vendor/mimeparse.js')
//autocompleterer
register('autocompleter', '/javascripts/vendor/autocompleter/autocompleter.js')
register('autocompleter-ext', '/javascripts/vendor/autocompleter/autocompleter-ext.js')
register('autocompleter-remote', '/javascripts/vendor/autocompleter/autocompleter-remote.js', 'autocompleter', 'autocompleter-ext')
register('autocompleter-local', '/javascripts/vendor/autocompleter/autocompleter-local.js', 'autocompleter', 'autocompleter-ext')
trace('browse');
var filter:Array = new Array();
if (options.typeFilter is Object){
for (var key:String in options.typeFilter) {
filter.push(new FileFilter(key, options.typeFilter[key]));
}
} else if (options.typeFilter is String) {
var description:String = options.typeFilterDescription || options.typeFilter;
var type:FileFilter = new FileFilter(description, options.typeFilter);
var mixin = new Class({
method: function(a) {
this.parent(a + 1)
}
});
var fancy = new Class({
method: function(a) {
console.log(a)
},
>>> var a = new Class({method: function() { console.log(1) }})
>>> var b = new Class({Extends: a, method: function() { console.log(2); this.parent(); }})
>>> var c = new Class({Extends: b})
>>> (new c).method(0)
2
1
>>> Class.refactor(c, {method: function() { this.previous(); console.log('c') }})
function()
>>> (new c).method(0)
2
Tabs.Sliding = new Class({
Extends: Tabs,
options: {
container: null
},
initialize: function(tabs, pages, options) {
var wrapper = options.container ? $(options.container).getElement('.canvas-wrapper') : pages.getParent('.canvas-wrapper')
SlidingCanvas.create(wrapper, pages, {
Then /it should (not )?have "(.*?)" (listing|saying|listing exactly|saying exactly|saying like|mentioning|mentioning any of) "(.*?)"/ do |negation, selector, action, text|
value = negation.blank?
should = value ? :should : :should_not
mode = value ? "" : " attempt to"
And %{I#{mode} focus at "#{selector}"}
case action
when "saying exactly"
text.send(should) == @focused_scope.to_s.gsub(/<\/?[^>]*>/, " ").gsub(/\s+/, ' ').gsub(/,\s*/, ', ').strip
when "saying like"
Feature: Authorships
To have an ability to communicate with colleagues effictively
Every project member
Can use shared blog
Scenario: Member and guest dont see edit authprship link
Given scenario "orwikcrew_members"
And I am authenticated as "invizko@gmail.com/test"
And I go to "http://orwikcrew.miixa.org/"