Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 417 additions and 332 deletions
# Class_Entity
## Description
In PHP we have StdClass on which we can set and get any direct property
```php
$o = new StdClass();
$o->title = 'my title';
echo $o->title; // -> my title
```
_Class_Entity_ provides same functionality with getter and setter methods
```php
$o = new Class_Entity();
$o->setTitle('my title');
echo $o->getTitle(); // -> my title
```
## Implementation
Any call to set*() will be catched to populate an internal key => value array, it will return $this to chain calls.
Any call to get*() will look for an existing key in internal array and will return its value or null if not found.
Keys of internal array are not transformed in any way
* setMyValue will produce a 'MyValue' key
* set_my_value will produce a '_my_value' key
* setmyvalue will produce a 'myvalue' key
You can define default values by setting
```php
protected $_attribs = ['MyValue' => ''];
```
Then a getMyValue() call will return an empty string instead of null if not set.
## Use cases
### In tests
When you have an API relying on getter and setter methods you can provide a _Class_Entity_ as a mock and easily verify that an attribute has been set or prepare it with attributes needed by tested code.
### In general
When you are modeling an object and don't want to write all those standard getters and setters just extend Class_Entity.
# ticket #22209
## Search result
Reification of the array returned by _Class_MoteurRecherche_ that contained queries for facets & record fetch. Now we have _Class_MoteurRecherche_Result_ that depends on search engine & search criterias. Noticeable methods:
* _recordsCollect($closure)_: for parsing all records. $closure must accept a record (_Class_Notice_).
* _acceptCriteresVisitor($visitor)_: for parsing search criterias
## Atom search feed generation
Add _ZendAfi_Feed_SearchResult_ as a _Class_MoteurRecherche_Result_ visitor that renders a search result as Atom feed.
# ticket #24821
## Notifications
In controllers, notifcations can be rendered as popup instead of static bars:
```php
$this->getHelper('notify')->bePopup()
```
_ZendAfi\_Controller\_Action\_Helper\_FlashMessenger_ notifications now stored as array and can accept parameters:
```php
public function addNotification($message, $options = []) {
$params = ['message' => $message] + $options;
$this->addMessage([ZendAfi_Controller_Action_Helper_FlashMessenger::NOTIFICATION => $params]);
}
```
and _FlashMessengerNotification_ represent a notification. For example to get all popups notifications:
```php
(new ZendAfi_Controller_Action_Helper_FlashMessenger())
->getNotifications()
->select(function($n) {return $n->isPopup();});
```
Users ILS subscription ('abonnement') related functions moved to new _Class\_User\_ILSSubscription_.
See _Class\_Users>>registerNotificationsOn_ for notifications usage.
## ILS Web services
Add _Class\_WebService\_SIGB\_Reservation>>isWaitingToBePulled_ that returns _true_ when holded document is available in library. Works for: Nanook, Koha, Microbib, Aloes, Carthame, Orphée, Pergame.
# Reload module content with AJAX
On module ajax link, add tag attributes: 'data-reload-module = true'.
For example:
```php
$this->view->tagAnchor($reload_link,
'',
['data-ajax-reload' => 'true',
'class' => 'reload-module',
'title' => $this->view->_('Recharger')]);
```
See public/opac/js/reload_module.js
\ No newline at end of file
- correctif #193156 : corrige la saisie manuelle dans les datetimepickers
\ No newline at end of file
- Amélioration de l'accessibilité des thèmes.
\ No newline at end of file
- correctif #204030 : Ressource Numérique : Arte VOD : l'option de mise à jour et de suppression des notices devient persistante
\ No newline at end of file
- correctif #218050 : Formulaire d'inscritpion à une session : n'affiche pas le message de placement en attente si le total max est à 0.
\ No newline at end of file
- correctif #220612 : corrige la récupération du site dans le formulaire des groupes dynamiques
\ No newline at end of file
- correctif #221141 : Profil : Modifier un profil qui a une url de redirection ne génère plus de message d'erreur de validation inadéquat.
\ No newline at end of file
- fonctionnalité #215562 : RGAA : amélioration de l'accessibilité et de l'autocomplétion des formulaires.
\ No newline at end of file
- fonctionnalité : Ajout du thème BlackBook en version de développement au magasin de thèmes.
\ No newline at end of file
......@@ -50,11 +50,20 @@ smalltalk.addMethod(
"_cssUrl",
smalltalk.method({
selector: "cssUrl",
fn: function (){
var self=this;
return (($receiver = self['@cssUrl']) == nil || $receiver == undefined) ? (function(){var linkTag=nil;
(linkTag=smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [unescape("%23profil_css")]));(self['@cssUrl']=smalltalk.send(linkTag, "_attr_", ["href"]));smalltalk.send(linkTag, "_remove", []);return self['@cssUrl'];})() : $receiver;
return self;}
fn: function(){
var self=this;
var $1;
var linkTag;
linkTag=smalltalk.send(window,"_jQuery_",["#profil_css"]);
self["@cssUrl"]=smalltalk.send(linkTag,"_attr_",["data-url"]);
if(($receiver = self["@cssUrl"]) == nil || $receiver == undefined){
$1=self["@cssUrl"];
} else {
self["@cssUrl"]=smalltalk.send(smalltalk.send(self["@cssUrl"],"__comma",["?dt="]),"__comma",[smalltalk.send(smalltalk.send((smalltalk.Date || Date),"_now",[]),"_asMilliseconds",[])]);
$1=self["@cssUrl"];
};
return $1;
}
}),
smalltalk.AFICssEditor);
......@@ -73,10 +82,22 @@ smalltalk.addMethod(
"_loadCss",
smalltalk.method({
selector: "loadCss",
fn: function (){
fn: function(){
var self=this;
(($receiver = smalltalk.send(self, "_cssUrl", [])) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_onSuccessDo_", [(function(data){smalltalk.send(self, "_contents_", [data]);return smalltalk.send(self, "_updateStyleTag", []);})]);return smalltalk.send($rec, "_send", []);})(smalltalk.send((smalltalk.Ajax || Ajax), "_url_", [self['@cssUrl']]));})() : nil;
return self;}
var $1,$2,$3;
$1=smalltalk.send(self,"_cssUrl",[]);
if(($receiver = $1) == nil || $receiver == undefined){
$1;
} else {
$2=smalltalk.send((smalltalk.Ajax || Ajax),"_url_",[self["@cssUrl"]]);
smalltalk.send($2,"_onSuccessDo_",[(function(data){
smalltalk.send(self,"_contents_",[data]);
return smalltalk.send(self,"_updateStyleTag",[]);
})]);
$3=smalltalk.send($2,"_send",[]);
$3;
};
return self}
}),
smalltalk.AFICssEditor);
......@@ -145,10 +166,16 @@ smalltalk.addMethod(
"_close",
smalltalk.method({
selector: "close",
fn: function (){
var self=this;
(($receiver = self['@current']) != nil && $receiver != undefined) ? (function(){smalltalk.send(self['@current'], "_close", []);return (self['@current']=nil);})() : nil;
return self;}
fn: function(){
var self=this;
if(($receiver = self["@current"]) == nil || $receiver == undefined){
self["@current"];
} else {
smalltalk.send(self["@current"],"_close",[]);
self["@current"]=nil;
self["@current"];
};
return self}
}),
smalltalk.AFICssEditor.klass);
......@@ -163,31 +190,15 @@ return self;}
}),
smalltalk.AFICssEditor.klass);
smalltalk.addMethod(
"_initializeold",
smalltalk.method({
selector: "initializeold",
fn: function (){
var self=this;
smalltalk.send(smalltalk.send((smalltalk.AFIIDETools || AFIIDETools),"_default",[]),"_addButton_action_",["Editeur CSS",(function(){
smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager),"_current",[]),"_tabs",[]),"_do_",[(function(aTab){
return smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager),"_current",[]),"_removeTab_",[aTab]);
})]);
return smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
})]);
return self}
}),
smalltalk.AFICssEditor.klass);
smalltalk.addMethod(
"_open",
smalltalk.method({
selector: "open",
fn: function (){
fn: function(){
var self=this;
(($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){(self['@current']=smalltalk.send(self, "_new", []));return smalltalk.send(self['@current'], "_open", []);})() : $receiver;
return self['@current'];
return self;}
smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
return self["@current"];
}
}),
smalltalk.AFICssEditor.klass);
......@@ -221,11 +232,14 @@ smalltalk.method({
selector: "setEditorOn:",
fn: function (aTextarea){
var self=this;
var params=nil;
(params=smalltalk.HashedCollection._fromPairs_([smalltalk.send("theme", "__minus_gt", ["jtalk"]),smalltalk.send("lineNumbers", "__minus_gt", [true]),smalltalk.send("enterMode", "__minus_gt", ["flat"]),smalltalk.send("matchBrackets", "__minus_gt", [true]),smalltalk.send("electricChars", "__minus_gt", [false]),smalltalk.send("onChange", "__minus_gt", [(function(editor, data){return smalltalk.send(self, "_editorChanged", []);})])]));
self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);
console.log(params);
return self;}
var params;
params=smalltalk.HashedCollection._fromPairs_([smalltalk.send("mode","__minus_gt",["css"]),smalltalk.send("lineNumbers","__minus_gt",[true]),smalltalk.send("enterMode","__minus_gt",["flat"]),smalltalk.send("matchBrackets","__minus_gt",[true]),smalltalk.send("electricChars","__minus_gt",[false])]);
self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);;
;
smalltalk.send(self["@editor"],"_on_do_",["change",(function(){
return smalltalk.send(self,"_editorChanged",[]);
})]);
return self}
}),
smalltalk.AFISourceArea);
......
......@@ -66,15 +66,24 @@ smalltalk.addMethod(
smalltalk.method({
selector: "cssUrl",
category: 'accessor',
fn: function (){
fn: function(){
var self=this;
return (($receiver = self['@cssUrl']) == nil || $receiver == undefined) ? (function(){var linkTag=nil;
(linkTag=smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [unescape("%23profil_css")]));(self['@cssUrl']=smalltalk.send(linkTag, "_attr_", ["href"]));smalltalk.send(linkTag, "_remove", []);return self['@cssUrl'];})() : $receiver;
return self;},
var $1;
var linkTag;
linkTag=smalltalk.send(window,"_jQuery_",["#profil_css"]);
self["@cssUrl"]=smalltalk.send(linkTag,"_attr_",["data-url"]);
if(($receiver = self["@cssUrl"]) == nil || $receiver == undefined){
$1=self["@cssUrl"];
} else {
self["@cssUrl"]=smalltalk.send(smalltalk.send(self["@cssUrl"],"__comma",["?dt="]),"__comma",[smalltalk.send(smalltalk.send((smalltalk.Date || Date),"_now",[]),"_asMilliseconds",[])]);
$1=self["@cssUrl"];
};
return $1;
},
args: [],
source: "cssUrl\x0a\x09^ cssUrl ifNil: [\x09|linkTag| \x0a\x09\x09\x09\x09 \x09linkTag := (window jQuery: '#profil_css'). \x0a\x09\x09\x09\x09 \x09cssUrl := linkTag attr: 'href'.\x0a\x09\x09\x09\x09\x09linkTag remove.\x0a\x09\x09\x09\x09\x09cssUrl ]",
messageSends: ["ifNil:", "jQuery:", "attr:", "remove"],
referencedClasses: []
source: "cssUrl\x0a\x09|linkTag|\x0a\x09linkTag := (window jQuery: '#profil_css').\x0a cssUrl := linkTag attr: 'data-url'.\x09\x0a ^ cssUrl ifNotNil: [cssUrl := cssUrl, '?dt=', Date now asMilliseconds ] ",
messageSends: ["jQuery:", "attr:", "ifNotNil:", ",", "asMilliseconds", "now"],
referencedClasses: ["Date"]
}),
smalltalk.AFICssEditor);
......@@ -99,13 +108,25 @@ smalltalk.addMethod(
smalltalk.method({
selector: "loadCss",
category: 'actions',
fn: function (){
fn: function(){
var self=this;
(($receiver = smalltalk.send(self, "_cssUrl", [])) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_onSuccessDo_", [(function(data){smalltalk.send(self, "_contents_", [data]);return smalltalk.send(self, "_updateStyleTag", []);})]);return smalltalk.send($rec, "_send", []);})(smalltalk.send((smalltalk.Ajax || Ajax), "_url_", [self['@cssUrl']]));})() : nil;
return self;},
var $1,$2,$3;
$1=smalltalk.send(self,"_cssUrl",[]);
if(($receiver = $1) == nil || $receiver == undefined){
$1;
} else {
$2=smalltalk.send((smalltalk.Ajax || Ajax),"_url_",[self["@cssUrl"]]);
smalltalk.send($2,"_onSuccessDo_",[(function(data){
smalltalk.send(self,"_contents_",[data]);
return smalltalk.send(self,"_updateStyleTag",[]);
})]);
$3=smalltalk.send($2,"_send",[]);
$3;
};
return self},
args: [],
source: "loadCss\x0a\x09self cssUrl ifNotNil: [\x09(Ajax url: cssUrl) \x0a\x09\x09\x09\x09\x09\x09onSuccessDo: [:data | \x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09self contents: data. \x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09 self updateStyleTag ];\x0a\x09\x09\x09\x09\x09\x09send. ].",
messageSends: ["ifNotNil:", "cssUrl", "onSuccessDo:", "contents:", "updateStyleTag", "send", "url:"],
messageSends: ["ifNotNil:", "onSuccessDo:", "contents:", "updateStyleTag", "url:", "send", "cssUrl"],
referencedClasses: ["Ajax"]
}),
smalltalk.AFICssEditor);
......@@ -201,12 +222,18 @@ smalltalk.addMethod(
smalltalk.method({
selector: "close",
category: 'not yet classified',
fn: function (){
fn: function(){
var self=this;
(($receiver = self['@current']) != nil && $receiver != undefined) ? (function(){smalltalk.send(self['@current'], "_close", []);return (self['@current']=nil);})() : nil;
return self;},
if(($receiver = self["@current"]) == nil || $receiver == undefined){
self["@current"];
} else {
smalltalk.send(self["@current"],"_close",[]);
self["@current"]=nil;
self["@current"];
};
return self},
args: [],
source: "close\x0a\x09current\x0a\x09\x09 ifNotNil: [\x09current close.\x0a\x09\x09\x09\x09\x09current := nil ].",
source: "close\x0a\x09current\x0a\x09\x09 ifNotNil: [ current close.\x0a\x09\x09\x09\x09\x09\x09 current := nil ].",
messageSends: ["ifNotNil:", "close"],
referencedClasses: []
}),
......@@ -228,40 +255,19 @@ referencedClasses: []
}),
smalltalk.AFICssEditor.klass);
smalltalk.addMethod(
"_initializeold",
smalltalk.method({
selector: "initializeold",
category: 'not yet classified',
fn: function (){
var self=this;
smalltalk.send(smalltalk.send((smalltalk.AFIIDETools || AFIIDETools),"_default",[]),"_addButton_action_",["Editeur CSS",(function(){
smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager),"_current",[]),"_tabs",[]),"_do_",[(function(aTab){
return smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager),"_current",[]),"_removeTab_",[aTab]);
})]);
return smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
})]);
return self},
args: [],
source: "initializeold\x0a\x09AFIIDETools default addButton: 'Editeur CSS' action: [\x0a\x09\x09\x09TabManager current tabs do: [:aTab| TabManager current removeTab: aTab].\x0a\x09\x09\x09self current open].",
messageSends: ["addButton:action:", "do:", "removeTab:", "current", "tabs", "open", "default"],
referencedClasses: ["TabManager", "AFIIDETools"]
}),
smalltalk.AFICssEditor.klass);
smalltalk.addMethod(
"_open",
smalltalk.method({
selector: "open",
category: 'not yet classified',
fn: function (){
fn: function(){
var self=this;
(($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){(self['@current']=smalltalk.send(self, "_new", []));return smalltalk.send(self['@current'], "_open", []);})() : $receiver;
return self['@current'];
return self;},
smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
return self["@current"];
},
args: [],
source: "open\x0a\x09current\x0a\x09\x09 ifNil: [\x09current := self new.\x0a\x09\x09\x09\x09current open ].\x0a\x09^ current",
messageSends: ["ifNil:", "new", "open"],
source: "open\x0a\x09self current open.\x0a\x09^ current",
messageSends: ["open", "current"],
referencedClasses: []
}),
smalltalk.AFICssEditor.klass);
......@@ -307,14 +313,17 @@ selector: "setEditorOn:",
category: 'not yet classified',
fn: function (aTextarea){
var self=this;
var params=nil;
(params=smalltalk.HashedCollection._fromPairs_([smalltalk.send("theme", "__minus_gt", ["jtalk"]),smalltalk.send("lineNumbers", "__minus_gt", [true]),smalltalk.send("enterMode", "__minus_gt", ["flat"]),smalltalk.send("matchBrackets", "__minus_gt", [true]),smalltalk.send("electricChars", "__minus_gt", [false]),smalltalk.send("onChange", "__minus_gt", [(function(editor, data){return smalltalk.send(self, "_editorChanged", []);})])]));
self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);
console.log(params);
return self;},
var params;
params=smalltalk.HashedCollection._fromPairs_([smalltalk.send("mode","__minus_gt",["css"]),smalltalk.send("lineNumbers","__minus_gt",[true]),smalltalk.send("enterMode","__minus_gt",["flat"]),smalltalk.send("matchBrackets","__minus_gt",[true]),smalltalk.send("electricChars","__minus_gt",[false])]);
self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);;
;
smalltalk.send(self["@editor"],"_on_do_",["change",(function(){
return smalltalk.send(self,"_editorChanged",[]);
})]);
return self},
args: ["aTextarea"],
source: "setEditorOn: aTextarea\x0a\x09|params|\x0a\x09params := #{ 'theme' -> 'jtalk'.\x0a \x09\x09'lineNumbers' -> true.\x0a \x09\x09'enterMode' -> 'flat'.\x0a \x09\x09'matchBrackets' -> true.\x0a \x09\x09'electricChars' -> false.\x0a\x09\x09\x09\x09'onChange' -> [:editor :data | self editorChanged]\x09}.\x0a\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);\x0a\x09 console.log(params)>",
messageSends: ["->", "editorChanged"],
source: "setEditorOn: aTextarea\x0a\x09|params|\x0a\x09params := #{\x0a \x09\x09\x09\x09\x09'mode' -> 'css'.\x0a \x09\x09'lineNumbers' -> true.\x0a \x09\x09'enterMode' -> 'flat'.\x0a \x09\x09'matchBrackets' -> true.\x0a \x09\x09'electricChars' -> false\x09}.\x0a \x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);>.\x0a editor on: 'change' do: [self editorChanged].",
messageSends: ["->", "on:do:", "editorChanged"],
referencedClasses: []
}),
smalltalk.AFISourceArea);
......
......@@ -1197,32 +1197,6 @@ fn: function (pageNo) {
}),
smalltalk.BookWidget);
smalltalk.addMethod(
"_ifIE_ifNotIE_",
smalltalk.method({
selector: "ifIE:ifNotIE:",
fn: function (aBlock, anotherBlock) {
var self = this;
smalltalk.send(smalltalk.send(self, "_isIE", []), "_ifTrue_ifFalse_", [aBlock, anotherBlock]);
return self;
}
}),
smalltalk.BookWidget);
smalltalk.addMethod(
"_isIE",
smalltalk.method({
selector: "isIE",
fn: function () {
var self = this;
var ie = nil;
ie = jQuery.browser.msie;
return smalltalk.send(ie, "_notNil", []);
return self;
}
}),
smalltalk.BookWidget);
smalltalk.addMethod(
"_isJQueryMobile",
smalltalk.method({
......
......@@ -1602,42 +1602,6 @@ referencedClasses: []
}),
smalltalk.BookWidget);
smalltalk.addMethod(
"_ifIE_ifNotIE_",
smalltalk.method({
selector: "ifIE:ifNotIE:",
category: 'testing',
fn: function (aBlock, anotherBlock) {
var self = this;
smalltalk.send(smalltalk.send(self, "_isIE", []), "_ifTrue_ifFalse_", [aBlock, anotherBlock]);
return self;
},
args: ["aBlock", "anotherBlock"],
source: "ifIE: aBlock ifNotIE: anotherBlock\x0a\x09self isIE ifTrue: aBlock ifFalse: anotherBlock",
messageSends: ["ifTrue:ifFalse:", "isIE"],
referencedClasses: []
}),
smalltalk.BookWidget);
smalltalk.addMethod(
"_isIE",
smalltalk.method({
selector: "isIE",
category: 'testing',
fn: function () {
var self = this;
var ie = nil;
ie = jQuery.browser.msie;
return smalltalk.send(ie, "_notNil", []);
return self;
},
args: [],
source: "isIE\x0a\x09|ie|\x0a\x09ie := <jQuery.browser.msie>.\x0a\x09^ ie notNil.",
messageSends: ["notNil"],
referencedClasses: []
}),
smalltalk.BookWidget);
smalltalk.addMethod(
"_isJQueryMobile",
smalltalk.method({
......
/* @Booklet
----------------------------------------*/
.booklet {width:800px; height:600px; position:relative; /*background:#fff;*/ margin:0 auto 10px; overflow:visible !important;}
.booklet .b-page {left:0; top:0; position:absolute; overflow:hidden; padding:0;}
.booklet .b-pN {}
.booklet .b-p0 {}
.booklet .b-p1 {}
.booklet .b-p2 {}
.booklet .b-p3 {}
.booklet .b-p4 {}
.booklet .b-load {}
/* Page Wrappers */
.booklet .b-wrap {top:0; position:absolute;}
.booklet .b-wrap-left {background:#fff;}
.booklet .b-wrap-right {background:#efefef;}
.booklet .b-pN .b-wrap,
.booklet .b-p1 .b-wrap,
.booklet .b-p2 .b-wrap,
.booklet .b-p3 .b-wrap,
.booklet .b-p4 .b-wrap {left:0;}
.booklet .b-p0 .b-wrap {right:0;}
/* Custom Page Types */
.booklet .b-page-blank {padding:0; width:100%; height:100%;}
.booklet .b-page-cover {padding:0; width:100%; height:100%; background:#925C0E;}
.booklet .b-page-cover h3 {color:#fff; text-shadow:0px 1px 3px #222;}
/* Page Numbers */
.booklet .b-counter {bottom:10px; position:absolute; display:block; width:25px; height:20px; background:#ccc; color:#444; text-align:center; font-family:Georgia, "Times New Roman", Times, serif; font-size:10px; padding:5px 0 0;}
.booklet .b-wrap-left .b-counter {left:10px;}
.booklet .b-wrap-right .b-counter {right:10px;}
/* Page Shadows */
.booklet .b-shadow-f {right:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-forward.png"); background-repeat:repeat-y; background-position:100% 0;}
.booklet .b-shadow-b {left:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-back.png"); background-repeat:repeat-y; background-position:0 0;}
.booklet .b-p0 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:100% 10px;}
.booklet .b-p3 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:0 10px;}
/* Overlay Controls */
.booklet .b-grab {cursor: url(images/openhand.cur), default;}
.booklet .b-grabbing {cursor: url(images/closedhand.cur), default;}
/* Overlay Controls */
.booklet .b-overlay {top:0; position:absolute; height:100%; width:50%;}
.booklet .b-overlay-prev {left:0;}
.booklet .b-overlay-next {right:0;}
/* Tab Controls */
.booklet .b-tab {background:#000; height:40px; width:100%; padding:10px 0 0; text-align:center; color:#ccc; position:absolute; font-size:11px;}
.booklet .b-tab-prev {left:0;}
.booklet .b-tab-next {right:0;}
.booklet .b-tab:hover {background:#aaa; color:#000;}
/* Arrow Controls */
.booklet .b-arrow {display:block; position:absolute; text-indent:-9999px; top:0; height:100%; width:74px;}
.booklet .b-arrow div {display:none; text-indent:-9999px; height:170px; width:74px; position:absolute; left:0; top:25%;}
.booklet .b-arrow-next {right:-80px;}
.booklet .b-arrow-prev {left:-80px;}
.booklet .b-arrow-next div {background:url("images/arrow-next.png") no-repeat left top;}
.booklet .b-arrow-prev div {background:url("images/arrow-prev.png") no-repeat left top;}
/* @z-index fix (needed for older IE browsers)
----------------------------------------*/
body {z-index:0;}
.b-menu {z-index:100;}
.b-selector {z-index:100;}
.booklet {z-index:10;}
.b-pN {z-index:10;}
.b-p0 {z-index:10;}
.b-p1 {z-index:10;}
.b-p2 {z-index:10;}
.b-p3 {z-index:10;}
.b-p4 {z-index:10;}
.b-prev {z-index:40;}
.b-next {z-index:40;}
.b-counter {z-index:40;}
/* @Menu Items
----------------------------------------*/
.b-menu {height:40px; padding:0 0 10px;}
.b-selector {height:40px; position:relative; float:right; border:none; color:#cecece; cursor:pointer;}
.b-selector .b-current {padding:8px 15px 12px; line-height:20px; min-width:18px; height:20px; display:block; background:#000; text-align:center;}
.b-selector-page {width:auto; margin-left:15px;}
.b-selector-chapter {width:auto;}
.b-selector:hover {color:#fff; background-position:left 0px;}
.b-selector:hover .b-current {background-position:right 0px;}
.b-selector ul {overflow:hidden; margin:0; list-style:none !important; position:absolute; top:40px; right:0; padding:0 0 10px; background:#000; width:240px; font:normal 12px "Myriad Pro", Myriad, "DejaVu Sans Condensed","Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;}
.b-selector li {border:none;}
.b-selector a {height:14px; text-decoration:none; display:block; padding:5px 10px;}
.b-selector a .b-text {float:left; clear:none;}
.b-selector a .b-num {float:right; clear:none;}
.b-selector a:hover {color:#fff;}
/* @Booklet
----------------------------------------*/
.booklet {width:800px; height:600px; position:relative; /*background:#fff;*/ margin:0 auto 10px; overflow:visible !important;}
.booklet .b-page {left:0; top:0; position:absolute; overflow:hidden; padding:0;}
.booklet .b-pN {}
.booklet .b-p0 {}
.booklet .b-p1 {}
.booklet .b-p2 {}
.booklet .b-p3 {}
.booklet .b-p4 {}
.booklet .b-load {}
/* Page Wrappers */
.booklet .b-wrap {top:0; position:absolute;}
.booklet .b-wrap-left {background:#fff;}
.booklet .b-wrap-right {background:#efefef;}
.booklet .b-pN .b-wrap,
.booklet .b-p1 .b-wrap,
.booklet .b-p2 .b-wrap,
.booklet .b-p3 .b-wrap,
.booklet .b-p4 .b-wrap {left:0;}
.booklet .b-p0 .b-wrap {right:0;}
/* Custom Page Types */
.booklet .b-page-blank {padding:0; width:100%; height:100%;}
.booklet .b-page-cover {padding:0; width:100%; height:100%; background:#925C0E;}
.booklet .b-page-cover h3 {color:#fff; text-shadow:0px 1px 3px #222;}
/* Page Numbers */
.booklet .b-counter {bottom:10px; position:absolute; display:block; width:25px; height:20px; background:#ccc; color:#444; text-align:center; font-family:Georgia, "Times New Roman", Times, serif; font-size:10px; padding:5px 0 0;}
.booklet .b-wrap-left .b-counter {left:10px;}
.booklet .b-wrap-right .b-counter {right:10px;}
/* Page Shadows */
.booklet .b-shadow-f {right:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-forward.png"); background-repeat:repeat-y; background-position:100% 0;}
.booklet .b-shadow-b {left:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-back.png"); background-repeat:repeat-y; background-position:0 0;}
.booklet .b-p0 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:100% 10px;}
.booklet .b-p3 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:0 10px;}
/* Overlay Controls */
.booklet .b-grab {cursor: url(images/openhand.cur), default;}
.booklet .b-grabbing {cursor: url(images/closedhand.cur), default;}
/* Overlay Controls */
.booklet .b-overlay {top:0; position:absolute; height:100%; width:50%;}
.booklet .b-overlay-prev {left:0;}
.booklet .b-overlay-next {right:0;}
/* Tab Controls */
.booklet .b-tab {background:#000; height:40px; width:100%; padding:10px 0 0; text-align:center; color:#ccc; position:absolute; font-size:11px;}
.booklet .b-tab-prev {left:0;}
.booklet .b-tab-next {right:0;}
.booklet .b-tab:hover {background:#aaa; color:#000;}
/* Arrow Controls */
.booklet .b-arrow {display:block; position:absolute; text-indent:-9999px; top:0; height:100%; width:74px;}
.booklet .b-arrow div {display:none; text-indent:-9999px; height:170px; width:74px; position:absolute; left:0; top:25%;}
.booklet .b-arrow-next {right:-80px;}
.booklet .b-arrow-prev {left:-80px;}
.booklet .b-arrow-next div {background:url("images/arrow-next.png") no-repeat left top;}
.booklet .b-arrow-prev div {background:url("images/arrow-prev.png") no-repeat left top;}
/* @z-index fix (needed for older IE browsers)
----------------------------------------*/
body {z-index:0;}
.b-menu {z-index:100;}
.b-selector {z-index:100;}
.booklet {z-index:10;}
.b-pN {z-index:10;}
.b-p0 {z-index:10;}
.b-p1 {z-index:10;}
.b-p2 {z-index:10;}
.b-p3 {z-index:10;}
.b-p4 {z-index:10;}
.b-prev {z-index:40;}
.b-next {z-index:40;}
.b-counter {z-index:40;}
/* @Menu Items
----------------------------------------*/
.b-menu {height:40px; padding:0 0 10px;}
.b-selector {height:40px; position:relative; float:right; border:none; color:#cecece; cursor:pointer;}
.b-selector .b-current {padding:8px 15px 12px; line-height:20px; min-width:18px; height:20px; display:block; background:#000; text-align:center;}
.b-selector-page {width:auto; margin-left:15px;}
.b-selector-chapter {width:auto;}
.b-selector:hover {color:#fff; background-position:left 0px;}
.b-selector:hover .b-current {background-position:right 0px;}
.b-selector ul {overflow:hidden; margin:0; list-style:none !important; position:absolute; top:40px; right:0; padding:0 0 10px; background:#000; width:240px; font:normal 12px "Myriad Pro", Myriad, "DejaVu Sans Condensed","Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;}
.b-selector li {border:none;}
.b-selector a {height:14px; text-decoration:none; display:block; padding:5px 10px;}
.b-selector a .b-text {float:left; clear:none;}
.b-selector a .b-num {float:right; clear:none;}
.b-selector a:hover {color:#fff;}
\ No newline at end of file
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
......@@ -190,7 +190,7 @@ $.widget( "ui.iviewer", $.ui.mouse, {
attr("width", 200).
removeAttr("height").
css({ top: 0, left: 0 }).
load(function(){
on('load', function(){
me.image_loaded = true;
me.img_object.object.removeAttr("width");
......
(function(c){c.widget("ui.iviewer",c.ui.mouse,{widgetEventPrefix:"iviewer",options:{zoom:"fit",zoom_base:100,zoom_max:800,zoom_min:25,zoom_delta:1.4,ui_disabled:false,update_on_resize:true,onZoom:null,initCallback:null,onStartDrag:null,onDrag:null,onMouseMove:null,onClick:null,onStartLoad:null,onFinishLoad:null},_create:function(){var a=this;this.dy=this.dx=0;this.zoomed=this.dragged=false;this.img_object={};this.zoom_object={};this.image_loaded=false;this.current_zoom=this.options.zoom;if(this.options.src!==
null)this.container=this.element,this._updateContainerInfo(),this.container.css("overflow","hidden"),this.options.update_on_resize==true&&c(window).resize(function(){a._updateContainerInfo()}),this.img_object.x=0,this.img_object.y=0,this.img_object.object=c("<img>").css({position:"relative",top:"0px",left:"0px"}).click(function(b){return a.click(b)}).mousewheel(function(b,c){a.zoom_by(c>0?1:-1);return false}),this.img_object.object.prependTo(a.container),this.loadImage(this.options.src),this.options.ui_disabled||
this.createui(),this.options.initCallback&&this.options.initCallback.call(this,a),this._mouseInit()},destroy:function(){this._mouseDestroy()},_updateContainerInfo:function(){this.options.height=this.container.height();this.options.width=this.container.width();if(this.options.width<=0)this.options.width=this.container.parent().width()},loadImage:function(a){this.current_zoom=this.options.zoom;this.image_loaded=false;var b=this;this.options.onStartLoad&&this.options.onStartLoad.call(this);this.img_object.object.unbind("load").removeAttr("src").attr("width",
200).removeAttr("height").css({top:0,left:0}).load(function(){b.image_loaded=true;b.img_object.object.removeAttr("width");if(this.width<=0)this.width=this.naturalWidth;if(this.height<=0)this.height=this.naturalHeight;b.img_object.display_width=b.img_object.orig_width=this.width;b.img_object.display_height=b.img_object.orig_height=this.height;b.container.hasClass("iviewer_cursor")||b.container.addClass("iviewer_cursor");b.options.zoom=="fit"?b.fit():b.set_zoom(b.options.zoom);b.options.onFinishLoad&&
b.options.onFinishLoad.call(b)}).attr("src",a)},fit:function(){this._updateContainerInfo();var a=0,a=this.img_object.orig_width/this.img_object.orig_height>this.options.width/this.options.height?this.options.width/this.img_object.orig_width*100:this.options.height/this.img_object.orig_height*100;this.set_zoom(a)},center:function(){this.setCoords(-Math.round((this.img_object.display_height-this.options.height)/2),-Math.round((this.img_object.display_width-this.options.width)/2))},moveTo:function(){Math.round(this.options.width/
2);Math.round(this.options.height/2);this.setCoords(this.img_object.x-this.dx,this.img_object.y-this.dy)},setCoords:function(a,b){this.image_loaded&&(c.extend(this.img_object,this._correctCoords(a,b)),this.img_object.object.css("top",this.img_object.y+"px").css("left",this.img_object.x+"px"))},_correctCoords:function(a,b){b>0&&(b=0);a>0&&(a=0);b+this.img_object.display_height<this.options.height&&(b=this.options.height-this.img_object.display_height);a+this.img_object.display_width<this.options.width&&
(a=this.options.width-this.img_object.display_width);this.img_object.display_width<=this.options.width&&(a=-(this.img_object.display_width-this.options.width)/2);this.img_object.display_height<=this.options.height&&(b=-(this.img_object.display_height-this.options.height)/2);return{x:a,y:b}},containerToImage:function(a,b){return a<this.img_object.x||b<this.img_object.y||a>this.img_object.x+this.img_object.display_width||b>this.img_object.y+this.img_object.display_height?false:{x:d.descaleValue(a-this.img_object.x,
this.current_zoom),y:d.descaleValue(b-this.img_object.y,this.current_zoom)}},imageToContainer:function(a,b){return a>this.img_object.orig_width||b>this.img_object.orig_height?false:{x:this.img_object.x+d.scaleValue(a,this.current_zoom),y:this.img_object.y+d.scaleValue(b,this.current_zoom)}},getMouseCoords:function(a){var b=this.img_object.object.offset();return{x:d.descaleValue(a.pageX-b.left,this.current_zoom),y:d.descaleValue(a.pageY-b.top,this.current_zoom)}},set_zoom:function(a){if(!(this.options.onZoom&&
this.options.onZoom.call(this,a)==false)&&this.image_loaded){if(a<this.options.zoom_min)a=this.options.zoom_min;else if(a>this.options.zoom_max)a=this.options.zoom_max;if(this.current_zoom=="fit"){var b=Math.round(this.options.width/2+this.img_object.orig_width/2),e=Math.round(this.options.height/2+this.img_object.orig_height/2);this.current_zoom=100}else b=-parseInt(this.img_object.object.css("left"),10)+Math.round(this.options.width/2),e=-parseInt(this.img_object.object.css("top"),10)+Math.round(this.options.height/
(function(c,l){c.widget("ui.iviewer",c.ui.mouse,{widgetEventPrefix:"iviewer",options:{zoom:"fit",zoom_base:100,zoom_max:800,zoom_min:25,zoom_delta:1.4,ui_disabled:!1,update_on_resize:!0,onZoom:null,initCallback:null,onStartDrag:null,onDrag:null,onMouseMove:null,onClick:null,onStartLoad:null,onFinishLoad:null},_create:function(){var a=this;this.dy=this.dx=0;this.zoomed=this.dragged=!1;this.img_object={};this.zoom_object={};this.image_loaded=!1;this.current_zoom=this.options.zoom;null!==this.options.src&&
(this.container=this.element,this._updateContainerInfo(),this.container.css("overflow","hidden"),!0==this.options.update_on_resize&&c(window).resize(function(){a._updateContainerInfo()}),this.img_object.x=0,this.img_object.y=0,this.img_object.object=c("<img>").css({position:"relative",top:"0px",left:"0px"}).click(function(b){return a.click(b)}).mousewheel(function(b,c){a.zoom_by(0<c?1:-1);return!1}),this.img_object.object.prependTo(a.container),this.loadImage(this.options.src),this.options.ui_disabled||
this.createui(),this.options.initCallback&&this.options.initCallback.call(this,a),this._mouseInit())},destroy:function(){this._mouseDestroy()},_updateContainerInfo:function(){this.options.height=this.container.height();this.options.width=this.container.width();0>=this.options.width&&(this.options.width=this.container.parent().width())},loadImage:function(a){this.current_zoom=this.options.zoom;this.image_loaded=!1;var b=this;this.options.onStartLoad&&this.options.onStartLoad.call(this);this.img_object.object.unbind("load").removeAttr("src").attr("width",
200).removeAttr("height").css({top:0,left:0}).on("load",function(){b.image_loaded=!0;b.img_object.object.removeAttr("width");0>=this.width&&(this.width=this.naturalWidth);0>=this.height&&(this.height=this.naturalHeight);b.img_object.display_width=b.img_object.orig_width=this.width;b.img_object.display_height=b.img_object.orig_height=this.height;b.container.hasClass("iviewer_cursor")||b.container.addClass("iviewer_cursor");"fit"==b.options.zoom?b.fit():b.set_zoom(b.options.zoom);b.options.onFinishLoad&&
b.options.onFinishLoad.call(b)}).attr("src",a)},fit:function(){this._updateContainerInfo();var a=0,a=this.img_object.orig_width/this.img_object.orig_height>this.options.width/this.options.height?100*(this.options.width/this.img_object.orig_width):100*(this.options.height/this.img_object.orig_height);this.set_zoom(a)},center:function(){this.setCoords(-Math.round((this.img_object.display_height-this.options.height)/2),-Math.round((this.img_object.display_width-this.options.width)/2))},moveTo:function(a,
b){Math.round(this.options.width/2);Math.round(this.options.height/2);this.setCoords(this.img_object.x-this.dx,this.img_object.y-this.dy)},setCoords:function(a,b){this.image_loaded&&(c.extend(this.img_object,this._correctCoords(a,b)),this.img_object.object.css("top",this.img_object.y+"px").css("left",this.img_object.x+"px"))},_correctCoords:function(a,b){0<b&&(b=0);0<a&&(a=0);b+this.img_object.display_height<this.options.height&&(b=this.options.height-this.img_object.display_height);a+this.img_object.display_width<
this.options.width&&(a=this.options.width-this.img_object.display_width);this.img_object.display_width<=this.options.width&&(a=-(this.img_object.display_width-this.options.width)/2);this.img_object.display_height<=this.options.height&&(b=-(this.img_object.display_height-this.options.height)/2);return{x:a,y:b}},containerToImage:function(a,b){return a<this.img_object.x||b<this.img_object.y||a>this.img_object.x+this.img_object.display_width||b>this.img_object.y+this.img_object.display_height?!1:{x:d.descaleValue(a-
this.img_object.x,this.current_zoom),y:d.descaleValue(b-this.img_object.y,this.current_zoom)}},imageToContainer:function(a,b){return a>this.img_object.orig_width||b>this.img_object.orig_height?!1:{x:this.img_object.x+d.scaleValue(a,this.current_zoom),y:this.img_object.y+d.scaleValue(b,this.current_zoom)}},getMouseCoords:function(a){var b=this.img_object.object.offset();return{x:d.descaleValue(a.pageX-b.left,this.current_zoom),y:d.descaleValue(a.pageY-b.top,this.current_zoom)}},set_zoom:function(a){if(!(this.options.onZoom&&
!1==this.options.onZoom.call(this,a))&&this.image_loaded){a<this.options.zoom_min?a=this.options.zoom_min:a>this.options.zoom_max&&(a=this.options.zoom_max);if("fit"==this.current_zoom){var b=Math.round(this.options.width/2+this.img_object.orig_width/2),e=Math.round(this.options.height/2+this.img_object.orig_height/2);this.current_zoom=100}else b=-parseInt(this.img_object.object.css("left"),10)+Math.round(this.options.width/2),e=-parseInt(this.img_object.object.css("top"),10)+Math.round(this.options.height/
2);var h=d.scaleValue(this.img_object.orig_width,a),f=d.scaleValue(this.img_object.orig_height,a),b=d.scaleValue(d.descaleValue(b,this.current_zoom),a),e=d.scaleValue(d.descaleValue(e,this.current_zoom),a),b=this.options.width/2-b,e=this.options.height/2-e;this.img_object.display_width=h;this.img_object.display_height=f;c.extend(this.img_object,this._correctCoords(b,e));this.img_object.object.animate({width:h,height:f,top:this.img_object.y,left:this.img_object.x},200);this.current_zoom=a;c.isFunction(this.options.onAfterZoom)&&
this.options.onAfterZoom.call(this,a);this.update_status()}},zoom_by:function(a){if(this.zoomed)return false;this.zoomed=true;var b=this.find_closest_zoom_rate(this.current_zoom)+a,b=this.options.zoom_base*Math.pow(this.options.zoom_delta,b);a>0&&b<this.current_zoom&&(b*=this.options.zoom_delta);a<0&&b>this.current_zoom&&(b/=this.options.zoom_delta);this.set_zoom(b);this.zoomed=false},find_closest_zoom_rate:function(a){function b(a,b){return a/b}function c(a,b){return a*b}if(a==this.options.zoom_base)return 0;
for(var d=a>this.options.zoom_base?c:b,f=a>this.options.zoom_base?1:-1,i=this.options.zoom_delta,g=1;Math.abs(d(this.options.zoom_base,Math.pow(i,g))-a)>Math.abs(d(this.options.zoom_base,Math.pow(i,g+1))-a);)g++;return f*g},update_status:function(){if(!this.options.ui_disabled){var a=Math.round(100*this.img_object.display_height/this.img_object.orig_height);a&&this.zoom_object.html(a+"%")}},_mouseStart:function(a){if(this.options.onStartDrag&&this.options.onStartDrag.call(this,this.getMouseCoords(a))==
false)return false;this.dragged=true;this.container.addClass("iviewer_drag_cursor");this.dx=a.pageX-this.img_object.x;this.dy=a.pageY-this.img_object.y;return true},_mouseCapture:function(){return true},_mouseDrag:function(a){this.options.onMouseMove&&this.options.onMouseMove.call(this,this.getMouseCoords(a));if(this.dragged)return this.options.onDrag&&this.options.onDrag.call(this,this.getMouseCoords(a)),this.setCoords(a.pageX-this.dx,a.pageY-this.dy),false},_mouseStop:function(){this.container.removeClass("iviewer_drag_cursor");
this.dragged=false},click:function(a){this.options.onClick&&this.options.onClick.call(this,this.getMouseCoords(a))},createui:function(){var a=this;c("<div>").addClass("iviewer_zoom_in").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.zoom_by(1);return false}).appendTo(this.container);c("<div>").addClass("iviewer_zoom_out").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.zoom_by(-1);return false}).appendTo(this.container);c("<div>").addClass("iviewer_zoom_zero").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.set_zoom(100);
return false}).appendTo(this.container);c("<div>").addClass("iviewer_zoom_fit").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.fit(this);return false}).appendTo(this.container);this.zoom_object=c("<div>").addClass("iviewer_zoom_status").addClass("iviewer_common").appendTo(this.container);this.update_status()}});var d={scaleValue:function(a,b){return a*b/100},descaleValue:function(a,b){return a*100/b}}})(jQuery,void 0);
this.options.onAfterZoom.call(this,a);this.update_status()}},zoom_by:function(a){if(this.zoomed)return!1;this.zoomed=!0;var b=this.find_closest_zoom_rate(this.current_zoom)+a,b=this.options.zoom_base*Math.pow(this.options.zoom_delta,b);0<a&&b<this.current_zoom&&(b*=this.options.zoom_delta);0>a&&b>this.current_zoom&&(b/=this.options.zoom_delta);this.set_zoom(b);this.zoomed=!1},find_closest_zoom_rate:function(a){function b(a,b){return a/b}function c(a,b){return a*b}if(a==this.options.zoom_base)return 0;
for(var d=a>this.options.zoom_base?c:b,f=a>this.options.zoom_base?1:-1,k=this.options.zoom_delta,g=1;Math.abs(d(this.options.zoom_base,Math.pow(k,g))-a)>Math.abs(d(this.options.zoom_base,Math.pow(k,g+1))-a);)g++;return f*g},update_status:function(){if(!this.options.ui_disabled){var a=Math.round(100*this.img_object.display_height/this.img_object.orig_height);a&&this.zoom_object.html(a+"%")}},_mouseStart:function(a){if(this.options.onStartDrag&&!1==this.options.onStartDrag.call(this,this.getMouseCoords(a)))return!1;
this.dragged=!0;this.container.addClass("iviewer_drag_cursor");this.dx=a.pageX-this.img_object.x;this.dy=a.pageY-this.img_object.y;return!0},_mouseCapture:function(a){return!0},_mouseDrag:function(a){this.options.onMouseMove&&this.options.onMouseMove.call(this,this.getMouseCoords(a));if(this.dragged)return this.options.onDrag&&this.options.onDrag.call(this,this.getMouseCoords(a)),this.setCoords(a.pageX-this.dx,a.pageY-this.dy),!1},_mouseStop:function(a){this.container.removeClass("iviewer_drag_cursor");
this.dragged=!1},click:function(a){this.options.onClick&&this.options.onClick.call(this,this.getMouseCoords(a))},createui:function(){var a=this;c("<div>").addClass("iviewer_zoom_in").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.zoom_by(1);return!1}).appendTo(this.container);c("<div>").addClass("iviewer_zoom_out").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.zoom_by(-1);return!1}).appendTo(this.container);c("<div>").addClass("iviewer_zoom_zero").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.set_zoom(100);
return!1}).appendTo(this.container);c("<div>").addClass("iviewer_zoom_fit").addClass("iviewer_common").addClass("iviewer_button").mousedown(function(){a.fit(this);return!1}).appendTo(this.container);this.zoom_object=c("<div>").addClass("iviewer_zoom_status").addClass("iviewer_common").appendTo(this.container);this.update_status()}});var d={scaleValue:function(a,b){return a*b/100},descaleValue:function(a,b){return 100*a/b}}})(jQuery,void 0);
......@@ -14,11 +14,10 @@ contents: aString
!
cssUrl
^ cssUrl ifNil: [ |linkTag|
linkTag := (window jQuery: '#profil_css').
cssUrl := linkTag attr: 'href'.
linkTag remove.
cssUrl ]
|linkTag|
linkTag := (window jQuery: '#profil_css').
cssUrl := linkTag attr: 'data-url'.
^ cssUrl ifNotNil: [cssUrl := cssUrl, '?dt=', Date now asMilliseconds ]
!
label
......@@ -91,24 +90,16 @@ AFICssEditor class instanceVariableNames: 'current'!
close
current
ifNotNil: [ current close.
current := nil ].
ifNotNil: [ current close.
current := nil ].
!
current
^current ifNil: [current := self new]
!
initializeold
AFIIDETools default addButton: 'Editeur CSS' action: [
TabManager current tabs do: [:aTab| TabManager current removeTab: aTab].
self current open].
!
open
current
ifNil: [ current := self new.
current open ].
self current open.
^ current
! !
......@@ -128,14 +119,14 @@ onChange: aBlock
setEditorOn: aTextarea
|params|
params := #{ 'theme' -> 'jtalk'.
params := #{
'mode' -> 'css'.
'lineNumbers' -> true.
'enterMode' -> 'flat'.
'matchBrackets' -> true.
'electricChars' -> false.
'onChange' -> [:editor :data | self editorChanged] }.
<self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);
console.log(params)>
'electricChars' -> false }.
<self['@editor'] = CodeMirror.fromTextArea(aTextarea, params);>.
editor on: 'change' do: [self editorChanged].
! !
......@@ -1421,16 +1421,6 @@ show
!BookWidget methodsFor: 'testing'!
ifIE: aBlock ifNotIE: anotherBlock
self isIE ifTrue: aBlock ifFalse: anotherBlock
!
isIE
|ie|
ie := <jQuery.browser.msie>.
^ ie notNil.
!
isJQueryMobile
^ (window jQuery at: 'jqmData') isNil not
! !
......
# Ignoring compiled files in examples etc
examples/nodejs/**/*.js
examples/webos/**/*.js
server/FileServer*.js
# Ignoring Mac Finder files
.DS_Store
# Ignoring compiled files in st
st/*.js
# In case amber is also saved in a local Subversion
.svn