aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/diabook')
-rw-r--r--view/theme/diabook/admin_site.tpl3
-rw-r--r--view/theme/diabook/bottom.tpl19
-rwxr-xr-xview/theme/diabook/communityhome.tpl23
-rw-r--r--view/theme/diabook/config.php36
-rw-r--r--view/theme/diabook/diabook-aerith/style-wide.css5
-rw-r--r--view/theme/diabook/diabook-aerith/style.css5
-rw-r--r--view/theme/diabook/diabook-blue/style-wide.css5
-rw-r--r--view/theme/diabook/diabook-blue/style.css5
-rw-r--r--view/theme/diabook/diabook-dark/style-network.css2
-rw-r--r--view/theme/diabook/diabook-dark/style-wide.css5
-rw-r--r--view/theme/diabook/diabook-dark/style.css22
-rw-r--r--view/theme/diabook/diabook-green/style-wide.css5
-rw-r--r--view/theme/diabook/diabook-green/style.css5
-rw-r--r--view/theme/diabook/diabook-pink/style-wide.css5
-rw-r--r--view/theme/diabook/diabook-pink/style.css5
-rw-r--r--view/theme/diabook/diabook-red/style-wide.css6
-rw-r--r--view/theme/diabook/diabook-red/style.css6
-rw-r--r--view/theme/diabook/jquery-ui-1.8.20.custom.css512
-rw-r--r--view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js62
-rw-r--r--view/theme/diabook/js/jquery.mapquery.core.js655
-rw-r--r--view/theme/diabook/js/jquery.mapquery.legend.js87
-rw-r--r--view/theme/diabook/js/jquery.mapquery.mqLayerManager.js310
-rw-r--r--view/theme/diabook/js/jquery.mapquery.mqMousePosition.js59
-rw-r--r--view/theme/diabook/js/jquery.twitter.search.js2
-rw-r--r--view/theme/diabook/nav.tpl2
-rw-r--r--view/theme/diabook/prv_message.tpl40
-rw-r--r--view/theme/diabook/style-wide.css4
-rw-r--r--view/theme/diabook/style.css4
-rwxr-xr-xview/theme/diabook/theme.php218
-rw-r--r--view/theme/diabook/theme_settings.tpl22
30 files changed, 1774 insertions, 365 deletions
diff --git a/view/theme/diabook/admin_site.tpl b/view/theme/diabook/admin_site.tpl
index dd89b81a9..346934b70 100644
--- a/view/theme/diabook/admin_site.tpl
+++ b/view/theme/diabook/admin_site.tpl
@@ -49,6 +49,9 @@
{{ inc field_input.tpl with $field=$proxy }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }}
{{ inc field_input.tpl with $field=$timeout }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$delivery_interval }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$poll_interval }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$maxloadavg }}{{ endinc }}
{{ inc field_input.tpl with $field=$abandon_days }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
diff --git a/view/theme/diabook/bottom.tpl b/view/theme/diabook/bottom.tpl
index 02ad1dcd2..50a15788d 100644
--- a/view/theme/diabook/bottom.tpl
+++ b/view/theme/diabook/bottom.tpl
@@ -14,7 +14,15 @@ $(document).ready(function() {
else $(this).attr("src",ifr_source+"?"+wmode);
});
-
+
+ $("div#pause").attr("style", "position: fixed;bottom: 43px;left: 5px;");
+ $("div#pause").html("<img src='images/pause.gif' alt='pause' title='pause live-updates (ctrl+space)' style='border: 1px solid black;opacity: 0.2;'>");
+ $(document).keydown(function(event) {
+ if (!$("div#pause").html()){
+ $("div#pause").html("<img src='images/pause.gif' alt='pause' title='pause live-updates (ctrl+space)' style='border: 1px solid black;opacity: 0.2;'>");
+ }});
+ $(".autocomplete").attr("style", "width: 350px;color: black;border: 1px solid #D2D2D2;background: white;cursor: pointer;text-align: left;max-height: 350px;overflow: auto;");
+
});
$(document).ready(function(){
@@ -38,6 +46,11 @@ $(document).ready(function() {
$("textarea#comment-edit-text-" +id).autogrow();
};
+ function open_boxsettings() {
+ $("div#boxsettings").attr("style","display: block;height:500px;width:300px;");
+ $("label").attr("style","width: 150px;");
+ };
+
function yt_iframe() {
$("iframe").load(function() {
var ifr_src = $(this).contents().find("body iframe").attr("src");
@@ -67,12 +80,14 @@ $(document).ready(function() {
$("a#top").attr("id","down");
$("a#down").attr("onclick","scrolldown()");
$("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_bottom.png");
+ $("img#scroll_top_bottom").attr("title","Scroll to bottom");
}
if (scrollInfo > "900"){
$("a#down").attr("id","top");
$("a#top").attr("onclick","scrolltop()");
$("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_top.png");
+ $("img#scroll_top_bottom").attr("title","Back to top");
}
});
@@ -113,4 +128,6 @@ $(document).ready(function() {
function cmtBbClose(id) {
$(".comment-edit-bb-" + id).hide();
}
+
+
</script>
diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl
index 60d4646cc..caefed3b3 100755
--- a/view/theme/diabook/communityhome.tpl
+++ b/view/theme/diabook/communityhome.tpl
@@ -10,16 +10,7 @@
<div id="mapcontrol" style="display:none;">
<form id="mapform" action="network" method="post" >
-<span style="width: 500px;position: relative;float: right;right:20px;"><p>this ist still under development.
-the idea is to provide a map with different layers(e.g. earth population, atomic power plants, wheat growing acreages, sunrise or what you want)
-and markers(events, demos, friends, anything, that is intersting for you).
-These layer and markers should be importable and deletable by the user.</p>
-<p>help on this feature is very appreciated. i am not that good in js so it's a start, but needs tweaks and further dev.
-just contact me, if you are intesrested in joining</p>
-<p>http://localhost/friendica/profile/thomas</p>
-<p>this is build with <b>mapquery</b> http://mapquery.org/ and
-<b>openlayers</b>http://openlayers.org/</p>
-</span>
+<div id="layermanager" style="width: 350px;position: relative;float: right;right:20px;height: 300px;"></div>
<div id="map2" style="height:350px;width:350px;"></div>
<div id="mouseposition" style="width: 350px;"></div>
{{inc field_input.tpl with $field=$ELZoom}}{{endinc}}
@@ -28,11 +19,22 @@ just contact me, if you are intesrested in joining</p>
<div class="settings-submit-wrapper">
<input id="mapsub" type="submit" value="$sub" class="settings-submit" name="diabook-settings-map-sub"></input>
</div>
+<span style="width: 500px;"><p>this ist still under development.
+the idea is to provide a map with different layers(e.g. earth population, atomic power plants, wheat growing acreages, sunrise or what you want)
+and markers(events, demos, friends, anything, that is intersting for you).
+These layer and markers should be importable and deletable by the user.</p>
+<p>help on this feature is very appreciated. i am not that good in js so it's a start, but needs tweaks and further dev.
+just contact me, if you are intesrested in joining</p>
+<p>https://toktan.org/profile/thomas</p>
+<p>this is build with <b>mapquery</b> http://mapquery.org/ and
+<b>openlayers</b>http://openlayers.org/</p>
+</span>
</form>
</div>
<div id="boxsettings" style="display:none">
<form id="boxsettingsform" action="network" method="post" >
+<fieldset><legend>$boxsettings.title.1</legend>
{{inc field_select.tpl with $field=$close_pages}}{{endinc}}
{{inc field_select.tpl with $field=$close_profiles}}{{endinc}}
{{inc field_select.tpl with $field=$close_helpers}}{{endinc}}
@@ -46,6 +48,7 @@ just contact me, if you are intesrested in joining</p>
<div class="settings-submit-wrapper">
<input id="boxsub" type="submit" value="$sub" class="settings-submit" name="diabook-settings-box-sub"></input>
</div>
+</fieldset>
</form>
</div>
diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php
index 84dd64834..cc7da1b00 100644
--- a/view/theme/diabook/config.php
+++ b/view/theme/diabook/config.php
@@ -143,12 +143,12 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear
'dark'=>'dark',
);
$close_pagesC = array(
- '1'=>'hide',
- '0'=>'show',
+ '0'=>'show',
+ '1'=>'hide',
);
$close_mapqueryC = array(
- '1'=>'hide',
- '0'=>'show',
+ '0'=>'show',
+ '1'=>'hide',
);
$close_profilesC = array(
'0'=>'show',
@@ -167,8 +167,8 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear
'1'=>'hide',
);
$close_twitterC = array(
- '1'=>'hide',
- '0'=>'show',
+ '0'=>'show',
+ '1'=>'hide',
);
$close_lastusersC = array(
'0'=>'show',
@@ -196,18 +196,18 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear
'$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors),
'$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm),
'$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom),
- '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX),
- '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY),
- '$close_pages' => array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC),
- '$close_mapquery' => array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC),
- '$close_profiles' => array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC),
- '$close_helpers' => array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC),
- '$close_services' => array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC),
- '$close_friends' => array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC),
- '$close_twitter' => array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC),
- '$close_lastusers' => array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC),
- '$close_lastphotos' => array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC),
- '$close_lastlikes' => array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC),
+ '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX),
+ '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY),
+ '$close_pages' => array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC),
+ '$close_mapquery' => array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC),
+ '$close_profiles' => array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC),
+ '$close_helpers' => array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC),
+ '$close_services' => array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC),
+ '$close_friends' => array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC),
+ '$close_twitter' => array('diabook_close_twitter', t('Last tweets'), $close_twitter, '', $close_twitterC),
+ '$close_lastusers' => array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC),
+ '$close_lastphotos' => array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC),
+ '$close_lastlikes' => array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC),
));
return $o;
}
diff --git a/view/theme/diabook/diabook-aerith/style-wide.css b/view/theme/diabook/diabook-aerith/style-wide.css
index 5c263154f..43c0974b1 100644
--- a/view/theme/diabook/diabook-aerith/style-wide.css
+++ b/view/theme/diabook/diabook-aerith/style-wide.css
@@ -555,6 +555,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -621,9 +622,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-aerith/style.css b/view/theme/diabook/diabook-aerith/style.css
index e0f38aff6..b512c8bfe 100644
--- a/view/theme/diabook/diabook-aerith/style.css
+++ b/view/theme/diabook/diabook-aerith/style.css
@@ -555,6 +555,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -621,9 +622,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-blue/style-wide.css b/view/theme/diabook/diabook-blue/style-wide.css
index 189f4d559..103047f32 100644
--- a/view/theme/diabook/diabook-blue/style-wide.css
+++ b/view/theme/diabook/diabook-blue/style-wide.css
@@ -554,6 +554,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -607,9 +608,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-blue/style.css b/view/theme/diabook/diabook-blue/style.css
index 2b68afc6f..e7f3fd0bc 100644
--- a/view/theme/diabook/diabook-blue/style.css
+++ b/view/theme/diabook/diabook-blue/style.css
@@ -554,6 +554,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -607,9 +608,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-dark/style-network.css b/view/theme/diabook/diabook-dark/style-network.css
index d9e2d0094..678e8597c 100644
--- a/view/theme/diabook/diabook-dark/style-network.css
+++ b/view/theme/diabook/diabook-dark/style-network.css
@@ -831,7 +831,7 @@ ul.menu-popup .empty {
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
}
.acpopupitem {
- color: #2e2f2e;
+ color: #eec;
padding: 4px;
clear: left;
}
diff --git a/view/theme/diabook/diabook-dark/style-wide.css b/view/theme/diabook/diabook-dark/style-wide.css
index 73d0e4c0f..3475408b2 100644
--- a/view/theme/diabook/diabook-dark/style-wide.css
+++ b/view/theme/diabook/diabook-dark/style-wide.css
@@ -553,6 +553,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -606,9 +607,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css
index fdc4e6481..189bd30bf 100644
--- a/view/theme/diabook/diabook-dark/style.css
+++ b/view/theme/diabook/diabook-dark/style.css
@@ -3,10 +3,7 @@
* Additional Changes: Michael Vogel <icarus@dabo.de>
**/
-/* ========= */
-/* = Admin = */
-/* ========= */
-
+/** Fancy Box **/
#fancybox-content {
width: 0;
height: 0;
@@ -19,6 +16,11 @@
background: #2e2e2f !important;
}
+
+/* ========= */
+/* = Admin = */
+/* ========= */
+
#adminpage {
/* width: 80%;*/
}
@@ -565,6 +567,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #2e2f2e;
@@ -615,9 +618,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
@@ -634,7 +635,7 @@ header #banner #logo-text {
text-decoration: none;
}
.mail-list-wrapper {
- background-color: #eec;
+ background-color: #333;
margin-bottom: 5px;
width: 100%;
height: auto;
@@ -645,6 +646,7 @@ header #banner #logo-text {
float: left;
width: 20%;
overflow: hidden;
+ background: #2e2e2f;
}
.mail-list-wrapper .mail-subject {
width: 30%;
@@ -916,7 +918,7 @@ nav #nav-apps-link.selected {
}
.notify-seen {
- background: none repeat scroll 0 0 #DDDDDD;
+ background: none repeat scroll 0 0 #666;
}
ul.menu-popup {
@@ -1686,7 +1688,7 @@ body .pageheader{
.wall-item-comment-wrapper .comment-edit-text-full {
font-size: 14px;
height: 4em;
- color: #2e302e;
+ color: #eec;
border: 1px solid #2e302e;
}
.comment-edit-preview {
diff --git a/view/theme/diabook/diabook-green/style-wide.css b/view/theme/diabook/diabook-green/style-wide.css
index d98a6c325..0a9c5e35c 100644
--- a/view/theme/diabook/diabook-green/style-wide.css
+++ b/view/theme/diabook/diabook-green/style-wide.css
@@ -555,6 +555,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -609,9 +610,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-green/style.css b/view/theme/diabook/diabook-green/style.css
index 6a9d8f7d0..762310e4d 100644
--- a/view/theme/diabook/diabook-green/style.css
+++ b/view/theme/diabook/diabook-green/style.css
@@ -557,6 +557,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -611,9 +612,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/*color*/
/* messages */
diff --git a/view/theme/diabook/diabook-pink/style-wide.css b/view/theme/diabook/diabook-pink/style-wide.css
index 849566aa0..e85c58850 100644
--- a/view/theme/diabook/diabook-pink/style-wide.css
+++ b/view/theme/diabook/diabook-pink/style-wide.css
@@ -555,6 +555,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -609,9 +610,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-pink/style.css b/view/theme/diabook/diabook-pink/style.css
index 798d73979..248e3ead0 100644
--- a/view/theme/diabook/diabook-pink/style.css
+++ b/view/theme/diabook/diabook-pink/style.css
@@ -557,6 +557,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -611,9 +612,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
/*color*/
diff --git a/view/theme/diabook/diabook-red/style-wide.css b/view/theme/diabook/diabook-red/style-wide.css
index b9ea238e2..b068a2f5d 100644
--- a/view/theme/diabook/diabook-red/style-wide.css
+++ b/view/theme/diabook/diabook-red/style-wide.css
@@ -554,6 +554,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -619,10 +620,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
- margin-left: 3px;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/diabook-red/style.css b/view/theme/diabook/diabook-red/style.css
index 05c802102..37e26b8b9 100644
--- a/view/theme/diabook/diabook-red/style.css
+++ b/view/theme/diabook/diabook-red/style.css
@@ -554,6 +554,7 @@ code {
text-decoration: none;
}
/* popup notifications */
+div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ }
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -619,10 +620,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
- margin-left: 3px;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/jquery-ui-1.8.20.custom.css b/view/theme/diabook/jquery-ui-1.8.20.custom.css
new file mode 100644
index 000000000..a180bee27
--- /dev/null
+++ b/view/theme/diabook/jquery-ui-1.8.20.custom.css
@@ -0,0 +1,512 @@
+/*!
+ * jQuery UI CSS Framework 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
+.ui-helper-clearfix:after { clear: both; }
+.ui-helper-clearfix { zoom: 1; }
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*!
+ * jQuery UI CSS Framework 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
+.ui-widget-content a { color: #333333; }
+.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
+.ui-widget-header a { color: #ffffff; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
+.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*!
+ * jQuery UI Resizable 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*!
+ * jQuery UI Selectable 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*!
+ * jQuery UI Accordion 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*!
+ * jQuery UI Button 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*!
+ * jQuery UI Dialog 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*!
+ * jQuery UI Slider 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*!
+ * jQuery UI Tabs 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*!
+ * jQuery UI Datepicker 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/*!
+ * jQuery UI Progressbar 1.8.20
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file
diff --git a/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js b/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js
index 8b173d965..de1d7ec14 100644
--- a/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js
+++ b/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js
@@ -40,10 +40,6 @@
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&&b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&&c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&&this.activate(c),b=="icons"&&(this._destroyIcons(),c&&this._createIcons()),b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?!1:this.headers.index(h);if(this.running||!d.collapsible&&i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&&e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&&!k[m]&&!a.easing[m]&&(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.20",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
* https://github.com/jquery/jquery-ui
-* Includes: jquery.ui.autocomplete.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.button.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&&(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(i?"":" ui-state-active"),m="ui-state-focus";h.label===null&&(h.label=this.buttonElement.html()),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){if(h.disabled)return;a(this).addClass("ui-state-hover"),this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave.button",function(){if(h.disabled)return;a(this).removeClass(l)}).bind("click.button",function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change.button",function(){if(f)return;b.refresh()}),this.buttonElement.bind("mousedown.button",function(a){if(h.disabled)return;f=!1,d=a.pageX,e=a.pageY}).bind("mouseup.button",function(a){if(h.disabled)return;if(d!==a.pageX||e!==a.pageY)f=!0})),this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).toggleClass("ui-state-active"),b.buttonElement.attr("aria-pressed",b.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;a(this).addClass("ui-state-active"),c=this,a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled)return!1;(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){c?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1);return}this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b),this.type==="radio"?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
@@ -66,60 +62,4 @@
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.progressbar.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.20"})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.core.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.20",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),(c/=f/2)<1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c<f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.blind.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&&g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.bounce.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&&d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight({margin:!0})/3:c.outerWidth({margin:!0})/3);e=="show"&&c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&&(g=g/(h*2)),e!="hide"&&h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m<h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing),g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g,c.animate(l,i/2,b.options.easing,function(){c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.clip.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=c[0].tagName=="IMG"?g:c,i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"},j=f=="vertical"?h.height():h.width();e=="show"&&(h.css(i.size,0),h.css(i.position,j/2));var k={};k[i.size]=e=="show"?j:0,k[i.position]=e=="show"?0:j/2,h.animate(k,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.drop.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0})/2:c.outerWidth({margin:!0})/2);e=="show"&&c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.explode.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden"),f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0,f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(!0),h=e.outerHeight(!0);for(var i=0;i<c;i++)for(var j=0;j<d;j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.fade.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.fold.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.highlight.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.pulsate.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i<e;i++)c.animate({opacity:h},f,b.options.easing),h=(h+1)%2;c.animate({opacity:h},f,b.options.easing,function(){h==0&&c.hide(),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.scale.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:!0,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}}),c.effect("scale",b.options,b.duration,b.callback),c.dequeue()})},a.effects.scale=function(b){return this.queue(function(){var c=a(this),d=a.extend(!0,{},b.options),e=a.effects.setMode(c,b.options.mode||"effect"),f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100),g=b.options.direction||"both",h=b.options.origin;e!="effect"&&(d.origin=h||["middle","center"],d.restore=!0);var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x},b.options.fade&&(e=="show"&&(c.from.opacity=0,c.to.opacity=1),e=="hide"&&(c.from.opacity=1,c.to.opacity=0)),d.from=c.from,d.to=c.to,d.mode=e,c.effect("size",d,b.duration,b.callback),c.dequeue()})},a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],j=a.effects.setMode(c,b.options.mode||"effect"),k=b.options.restore||!1,l=b.options.scale||"both",m=b.options.origin,n={height:c.height(),width:c.width()};c.from=b.options.from||n,c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y,c.from.left=(n.width-c.from.width)*p.x,c.to.top=(n.height-c.to.height)*p.y,c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.width},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both")q.from.y!=q.to.y&&(d=d.concat(h),c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(d=d.concat(i),c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to));(l=="content"||l=="both")&&q.from.y!=q.to.y&&(d=d.concat(g),c.from=a.effects.setTransition(c,g,q.from.y,c.from),c.to=a.effects.setTransition(c,g,q.to.y,c.to)),a.effects.save(c,k?d:e),c.show(),a.effects.createWrapper(c),c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both")h=h.concat(["marginTop","marginBottom"]).concat(g),i=i.concat(["marginLeft","marginRight"]),f=d.concat(h).concat(i),c.find("*[width]").each(function(){var c=a(this);k&&a.effects.save(c,f);var d={height:c.height(),width:c.width()};c.from={height:d.height*q.from.y,width:d.width*q.from.x},c.to={height:d.height*q.to.y,width:d.width*q.to.x},q.from.y!=q.to.y&&(c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.options.easing,function(){k&&a.effects.restore(c,f)})});c.animate(c.to,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){c.to.opacity===0&&c.css("opacity",c.from.opacity),j=="hide"&&c.hide(),a.effects.restore(c,k?d:e),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.shake.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p<h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.slide.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"show"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0}):c.outerWidth({margin:!0}));e=="show"&&c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30
-* https://github.com/jquery/jquery-ui
-* Includes: jquery.effects.transfer.js
-* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);; \ No newline at end of file
+(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.20"})})(jQuery);; \ No newline at end of file
diff --git a/view/theme/diabook/js/jquery.mapquery.core.js b/view/theme/diabook/js/jquery.mapquery.core.js
index 606a343f4..b9dd16c8b 100644
--- a/view/theme/diabook/js/jquery.mapquery.core.js
+++ b/view/theme/diabook/js/jquery.mapquery.core.js
@@ -17,11 +17,11 @@ the matched element
**options** an object of key-value pairs with options for the map. Possible
pairs are:
- * **layers** (array of MapQuery.Layer *or* MapQuery.Layer): Either an array
- * or a single layer that should be added to the map
+ * **layers** (array of MapQuery.Layer *or* MapQuery.Layer): Either an array
+ or a single layer that should be added to the map
* **center** ({position: [x,y], zoom: z(int), box: [llx,lly,urx,ury]}):
- * Initially go to a certain location. At least one layer (in the `layers`
- * option) needs to be specified.
+ Initially go to a certain location. At least one layer (in the `layers`
+ option) needs to be specified.
> Returns: $('selector') (jQuery object)
@@ -68,6 +68,8 @@ $.MapQuery.Map = function(element, options) {
delete this.olMapOptions.layers;
delete this.olMapOptions.maxExtent;
delete this.olMapOptions.zoomToMaxExtent;
+ delete this.olMapOptions.center;
+
//TODO SMO20110630 the maxExtent is in mapprojection, decide whether or
//not we need to change it to displayProjection
this.maxExtent = this.options.maxExtent;
@@ -75,6 +77,9 @@ $.MapQuery.Map = function(element, options) {
this.maxExtent[0],this.maxExtent[1],this.maxExtent[2],this.maxExtent[3]);
+ this.projection = this.options.projection;
+ this.displayProjection = this.options.displayProjection;
+
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
OpenLayers.Util.onImageLoadErrorColor = "transparent";
@@ -96,14 +101,46 @@ $.MapQuery.Map = function(element, options) {
// To bind and trigger jQuery events
this.events = $({});
- // create triggers for all OpenLayers map events
- var events = {};
- $.each(this.olMap.EVENT_TYPES, function(i, evt) {
- events[evt] = function() {
- self.events.trigger(evt, arguments);
- };
+
+ this.handlers = {
+ // Triggers the jQuery events, after the OpenLayers events
+ // happened without any further processing
+ simple: function(data) {
+ this.trigger(data.type);
+ }
+ };
+
+ // MapQuery doesn't bind all OpenLayers events automatically,
+ // but just the ones that make sense.
+ // Events that are left out intensionally are:
+ // - changebaselayer: MapQuery doesn't have the concept of base layers
+ // - mouseover, mouseout, mousemove: Handle those with jQuery on the
+ // DOM level
+ // Some events can be triggered by MapQuery without listening to the
+ // OpenLayers events. This only works for events that are triggered
+ // by functionality that MapQuery implements in some custom way, e.g.
+ // (pre)addlayer, (pre)removelayer, changelayer.
+ // TODO vmx 20120309: Proper docs for the events, here's some quickly
+ // written info:
+ // - generally spoken, the map events follow the OpeLayer events
+ // - preaddlayer, movestart, move, moveend, zoomend: no additional
+ // argument
+ // - addlayer, preremovelayer, removelayer: layer as additional argument
+ // - changelayer: layer and the property that changed as additional
+ // argument. Possible values for the property are: position (in
+ // the layer stack), opacity, visibility
+ // Currently this event is always fired, even if the property
+ // was only meant to be changed, but wasn't exctually changed.
+ // I.e. that the event is fired even if you call
+ // `layer.visible(true)` although the layer is already visible.
+ // I'm (vmx) not sure if we want to change that :)
+ this.olMap.events.on({
+ scope: this,
+ movestart: this.handlers.simple,
+ move: this.handlers.simple,
+ moveend: this.handlers.simple,
+ zoomend: this.handlers.simple
});
- this.olMap.events.on(events);
// Add layers to the map
if (this.options.layers!==undefined) {
@@ -129,7 +166,7 @@ _version added 0.1_
**options** an object of key-value pairs with options to create one or
more layers
->Returns: [layer] (array of MapQuery.Layer)
+>Returns: [layer] (array of MapQuery.Layer) _or_ false
The `.layers()` method allows us to attach layers to a mapQuery object. It takes
@@ -138,6 +175,10 @@ layer options objects. If an options object is given, it will return the
resulting layer(s). We can also use it to retrieve all layers currently attached
to the map.
+When adding layers, those are returned. If the creation is cancled by returning
+`false` in the `preaddlayer` event, this function returns `false` to
+intentionally break the chain instead of hiding errors subtly).
+
var osm = map.layers({type:'osm'}); //add an osm layer to the map
var layers = map.layers(); //get all layers of the map
@@ -156,7 +197,7 @@ to the map.
else {
return $.map(options, function(layer) {
return self._addLayer(layer);
- });
+ }).reverse();
}
break;
default:
@@ -182,27 +223,43 @@ to the map.
_addLayer: function(options) {
var id = this._createId();
var layer = new $.MapQuery.Layer(this, id, options);
+ // NOTE vmx 20120305: Not sure if this is a good idea, or if it would
+ // be better to include `options` with the preaddlayer event
+ if (this._triggerReturn('preaddlayer', [layer])===false) {
+ return false;
+ }
+ this.olMap.addLayer(layer.olLayer);
+
this.layersList[id] = layer;
if (layer.isVector) {
this.vectorLayers.push(id);
}
this._updateSelectFeatureControl(this.vectorLayers);
- this.events.trigger('mqAddLayer',layer);
+
+ layer.trigger('addlayer');
return layer;
},
// Creates a new unique ID for a layer
_createId: function() {
- return 'mapquery' + this.idCounter++;
+ return 'mapquery_' + this.idCounter++;
},
_removeLayer: function(id) {
+ var layer = this.layersList[id];
+ if (this._triggerReturn('preremovelayer', [layer])===false) {
+ return false;
+ }
+
// remove id from vectorlayer if it is there list
this.vectorLayers = $.grep(this.vectorLayers, function(elem) {
return elem != id;
});
this._updateSelectFeatureControl(this.vectorLayers);
- this.events.trigger('mqRemoveLayer',id);
- delete this.layersList[id];
+ this.olMap.removeLayer(layer.olLayer);
+
// XXX vmx: shouldn't the layer be destroyed() properly?
+ delete this.layersList[id];
+
+ layer.trigger('removelayer');
return this;
},
/**
@@ -210,13 +267,13 @@ to the map.
_version added 0.1_
####**Description**: get/set the extent, zoom and position of the map
-**position** the position as [x,y] in displayProjection (default EPSG:4326)
+ * **position** the position as [x,y] in displayProjection (default EPSG:4326)
to center the map at
-**zoom** the zoomlevel as integer to zoom the map to
-**box** an array with the lower left x, lower left y, upper right x,
+ * **zoom** the zoomlevel as integer to zoom the map to
+ * **box** an array with the lower left x, lower left y, upper right x,
upper right y to zoom the map to,
this will take precedent when conflicting with any of the above values
-**projection** the projection the coordinates are in, default is
+ * **projection** the projection the coordinates are in, default is
the displayProjection
>Returns: {position: [x,y], zoom: z(int), box: [llx,lly,urx,ury]}
@@ -239,7 +296,7 @@ extent from the map. The coordinates are returned in displayProjection.
*/
center: function (options) {
var position;
- var mapProjection;
+ var mapProjection = new OpenLayers.Projection(this.projection);
// Determine source projection
var sourceProjection = null;
var zoom;
@@ -249,7 +306,7 @@ extent from the map. The coordinates are returned in displayProjection.
'OpenLayers.Projection' ? options.projection :
new OpenLayers.Projection(options.projection);
} else {
- var displayProjection = this.olMap.displayProjection;
+ var displayProjection = this.displayProjection;
if(!displayProjection) {
// source == target
sourceProjection = new OpenLayers.Projection('EPSG:4326');
@@ -265,8 +322,6 @@ extent from the map. The coordinates are returned in displayProjection.
position = this.olMap.getCenter();
zoom = this.olMap.getZoom();
box = this.olMap.getExtent();
- mapProjection = this.olMap.getProjectionObject();
-
if (!mapProjection.equals(sourceProjection)) {
position.transform(mapProjection, sourceProjection);
@@ -282,9 +337,8 @@ extent from the map. The coordinates are returned in displayProjection.
// Zoom to the extent of the box
if (options.box!==undefined) {
- mapProjection = this.olMap.getProjectionObject();
box = new OpenLayers.Bounds(
- options.box[0], options.box[1],options.box[2], options.box[3]);
+ options.box[0], options.box[1],options.box[2], options.box[3]);
if (!mapProjection.equals(sourceProjection)) {
box.transform(sourceProjection,mapProjection);
}
@@ -299,7 +353,6 @@ extent from the map. The coordinates are returned in displayProjection.
else {
position = new OpenLayers.LonLat(options.position[0],
options.position[1]);
- mapProjection = this.olMap.getProjectionObject();
if (!mapProjection.equals(sourceProjection)) {
position.transform(sourceProjection, mapProjection);
}
@@ -323,11 +376,89 @@ extent from the map. The coordinates are returned in displayProjection.
this.olMap.addControl(this.selectFeatureControl);
this.selectFeatureControl.activate();
},
- bind: function() {
- this.events.bind.apply(this.events, arguments);
+ // This function got a bit too clever. The reason is, that jQuery's
+ // bind() is overloaded with so many possible combinations of arguments.
+ // And, of course, MapQuery wants to support them all
+ // The essence of the function is to wrap the original callback into
+ // the correct scope
+ bind: function(types, data, fn) {
+ var self = this;
+
+ // A map of event/handle pairs, wrap each of them
+ if(arguments.length===1) {
+ var wrapped = {};
+ $.each(types, function(type, fn) {
+ wrapped[type] = function() {
+ return fn.apply(self, arguments);
+ };
+ });
+ this.events.bind.apply(this.events, [wrapped]);
+ }
+ else {
+ var args = [types];
+ // Only callback given, but no data (types, fn), hence
+ // `data` is the function
+ if(arguments.length===2) {
+ fn = data;
+ }
+ else {
+ if (!$.isFunction(fn)) {
+ throw('bind: you might have a typo in the function name');
+ }
+ // Callback and data given (types, data, fn), hence include
+ // the data in the argument list
+ args.push(data);
+ }
+
+ args.push(function() {
+ return fn.apply(self, arguments);
+ });
+
+ this.events.bind.apply(this.events, args);
+ }
+
+ //this.events.bind.call(this.events, types, function() {
+ // data.apply(self, arguments);
+ //});
+ //this.events.bind.call(this.events, types, function() {
+ // data.apply(self, arguments);
+ //});
+
+ //this.events.bind.apply(this.events, arguments);
+ //this.events.bind.call(this.events, types, $.proxy(data, self));
+ //this.events.bind.apply(this.events, arguments);//.bind(this);
+ //this.events.bind.apply(this.events, $.proxy(arguments));//.bind(this);
+ //this.events.bind.apply(this.events, $.proxy(arguments));//.bind(this);
+ //this.events.bind(types, data, fn);//.bind(this);
+ //this.events.bind.call(this.events, types, data, fn);//.bind(this);
+ return this;
},
- one: function() {
- this.events.one.apply(this.events, arguments);
+/**
+###*map*.`trigger(name [, parameters])`
+_version added 0.2_
+####**Description**: triggers an event on the map
+
+ * **name** the name of the event
+ * **parameters** additional parameters that will be passed on with the event
+
+>Returns: map (MapQuery.Map)
+
+To subscribe to the triggered events, you need to bind to the mapuuu.
+
+ map.bind('myEvent', function(evt) {
+ console.log('the values are: ' + evt.data[0] + ' and ' + evt.data[1])
+ });
+ map.trigger('myEvent', 'some', 'values');
+*/
+ trigger: function() {
+ // There is no point in using trigger() insted of triggerHandler(), as
+ // we don't fire native events
+ this.events.triggerHandler.apply(this.events, arguments);
+ return this;
+ },
+ // Basically a trigger that returns the return value of the last listener
+ _triggerReturn: function() {
+ return this.events.triggerHandler.apply(this.events, arguments);
},
destroy: function() {
this.olMap.destroy();
@@ -363,6 +494,32 @@ $.MapQuery.Layer = function(map, id, options) {
// to bind and trigger jQuery events
this.events = $({});
+ this.handlers = {
+ // Triggers the jQuery events, after the OpenLayers events
+ // happened without any further processing
+ simple: function(data) {
+ this.trigger(data.type);
+ },
+ // All OpenLayers events that are triggered by user interaction,
+ // like clicking somewhere or selecting a feature, need to be
+ // handled in a special way. Those OpenLayers events will then be
+ // triggered by MapQuery as well
+ // In case of the "featureselected" event, this means that the
+ // logic of handling the event is completely within the event
+ // handler. When ".select()" on a feature is called, it will just
+ // trigger the OpenLayers "featureselected" event, whose handler
+ // will then trigger the corresponding jQuery event.
+ includeFeature: function(data) {
+ var feature = new $.MapQuery.Feature(this, {olFeature:
+ data.feature});
+ this.trigger(data.type, [feature]);
+ },
+ prependLayer: function(data) {
+ this.trigger('layer' + data.type);
+ }
+ };
+
+
// create the actual layer based on the options
// Returns layer and final options for the layer (for later re-use,
// e.g. zoomToMaxExtent).
@@ -371,17 +528,26 @@ $.MapQuery.Layer = function(map, id, options) {
this.olLayer = res.layer;
this.options = res.options;
- // create triggers for all OpenLayers layer events
- var events = {};
- $.each(this.olLayer.EVENT_TYPES, function(i, evt) {
- events[evt] = function() {
- self.events.trigger(evt, arguments);
- self.map.events.trigger(evt, arguments);
- };
+ // Some good documentation for the events is needed. Here is a short
+ // description on how the current events compare to the OpenLayer
+ // events on the layer:
+ // - added, remove: not needed, there's addlayer and removelayer
+ // - visibilitychanged: not needed, there's the changelayer event
+ // - move, moveend: not needed as you get them from the map, not the layer
+ // - loadstart, loadend: renamed to layerloadstart, layerloadend
+ this.olLayer.events.on({
+ scope: this,
+ loadstart: this.handlers.prependLayer,
+ loadend: this.handlers.prependLayer,
+ featureselected: this.handlers.includeFeature,
+ featureunselected: this.handlers.includeFeature,
+ featureremoved: this.handlers.includeFeature
});
- this.olLayer.events.on(events);
- this.map.olMap.addLayer(this.olLayer);
+ // To be able to retreive the MapQuery layer, when we only have the
+ // OpenLayers layer available. For example on the layeradded event.
+ // NOTE vmx 2012-02-26: Any nicer solution is welcome
+ this.olLayer.mapQueryId = this.id;
};
$.MapQuery.Layer.prototype = {
@@ -390,7 +556,7 @@ $.MapQuery.Layer.prototype = {
_version added 0.1_
####**Description**: move the layer down in the layer stack of the map
-**delta** the amount of layers the layer has to move down in the layer
+ * **delta** the amount of layers the layer has to move down in the layer
stack (default 1)
>Returns layer (MapQuery.Layer)
@@ -421,22 +587,21 @@ will put the layer at the bottom.
each: function () {},
/**
###*layer*.`remove()`
-_version added 0.1_
+_version added 0.2_
####**Description**: remove the layer from the map
->Returns: id (string)
+>Returns: map (MapQuery.Map) or false
The `.remove()` method allows us to remove a layer from the map.
-It returns an id to allow widgets to remove their references to the
-destroyed layer.
+It returns the `map` object if the layer was removed, or `false` if the
+removal was prevented in the preremovelayer event.
var id = layer.remove(); //remove this layer
*/
remove: function() {
- this.map.olMap.removeLayer(this.olLayer);
// remove references to this layer that are stored in the
// map object
return this.map._removeLayer(this.id);
@@ -447,9 +612,9 @@ _version added 0.1_
####**Description**: get/set the `position` of the layer in the layer
stack of the map
-**position** an integer setting the new position of the layer in the layer stack
+ * **position** an integer setting the new position of the layer in the layer stack
->Returns: position (integer)
+>Returns: position (integer) _or_ layer (MapQuery.Layer)
The `.position()` method allows us to change the position of the layer in the
@@ -467,7 +632,9 @@ return the current postion.
return this.map.olMap.getLayerIndex(this.olLayer)-1;
}
else {
- return this.map.olMap.setLayerIndex(this.olLayer, pos+1);
+ this.map.olMap.setLayerIndex(this.olLayer, pos+1);
+ this.trigger('changelayer', ['position']);
+ return this;
}
},
/**
@@ -475,7 +642,7 @@ return the current postion.
_version added 0.1_
####**Description**: move the layer up in the layer stack of the map
-**delta** the amount of layers the layer has to move up in the layer
+ * **delta** the amount of layers the layer has to move up in the layer
stack (default 1)
>Returns: layer (MapQuery.Layer)
@@ -503,7 +670,7 @@ given.
_version added 0.1_
####**Description**: get/set the `visible` state of the layer
-**visible** a boolean setting the visibiliyu of the layer
+ * **visible** a boolean setting the visibility of the layer
>Returns: visible (boolean)
@@ -522,6 +689,7 @@ If no visible is given, it will return the current visibility.
}
else {
this.olLayer.setVisibility(vis);
+ this.trigger('changelayer', ['visibility']);
return this;
}
},
@@ -530,9 +698,9 @@ If no visible is given, it will return the current visibility.
_version added 0.1_
####**Description**: get/set the `opacity` of the layer
-**position** a float [0-1] setting the opacity of the layer
+ * **position** a float [0-1] setting the opacity of the layer
->Returns: opacity (float)
+>Returns: opacity (float) _or_ layer (MapQuery.Layer)
The `.opacity()` method allows us to change the opacity of the layer.
@@ -544,24 +712,265 @@ If no opacity is given, it will return the current opacity.
*/
opacity: function(opac) {
- if (opac===undefined) {
+ if (opac===undefined) {
// this.olLayer.opacity can be null if never
- // set so return the visibility
+ // set so return the visibility
var value = this.olLayer.opacity ?
this.olLayer.opacity : this.olLayer.getVisibility();
return value;
}
else {
this.olLayer.setOpacity(opac);
+ this.trigger('changelayer', ['opacity']);
return this;
}
},
// every event gets the layer passed in
bind: function() {
- this.events.bind.apply(this.events, arguments);
+ // Use the same bind function as for the map
+ this.map.bind.apply(this, arguments);
+ return this;
+ },
+/**
+###*layer*.`trigger(name [, parameters])`
+_version added 0.2_
+####**Description**: triggers an event on the layer and map
+
+ * **name** the name of the event
+ * **parameters** additional parameters that will be passed on with the event
+
+>Returns: layer (MapQuery.Layer)
+
+The events get triggered on the layer as well as on the map. To subscribe to
+the triggered events, you can either bind to the layer or the map. If bound
+to the map, the second argument in the bind will be the layer the event
+came from
+
+ layer.bind('myEvent', function(evt) {
+ console.log('the values are: ' + evt.data[0] + ' and ' + evt.data[1])
+ });
+ map.bind('myEvent', function(evt, layer) {
+ console.log('the values are: ' + evt.data[0] + ' and ' + evt.data[1])
+ });
+ layer.trigger('myEvent', 'some', 'values');
+*/
+ trigger: function() {
+ var args = Array.prototype.slice.call(arguments);
+ this.events.triggerHandler.apply(this.events, args);
+
+ this._addLayerToArgs(args);
+
+ this.map.events.triggerHandler.apply(this.map.events, args);
+ return this;
+ },
+ // Basically a trigger that returns the return value of the last listener
+ _triggerReturn: function() {
+ var args = Array.prototype.slice.call(arguments);
+ var ret = this.events.triggerHandler.apply(this.events, args);
+ if (ret !== undefined) {
+ return ret;
+ }
+
+ this._addLayerToArgs(args);
+ return this.events.triggerHandler.apply(this.map.events, args);
+ },
+ // Adds the current layer to the event arguments, so that it is included
+ // in the event on the map
+ _addLayerToArgs: function(args) {
+ // Add layer for the map event
+ if (args.length===1) {
+ args.push([this]);
+ }
+ else {
+ args[1].unshift(this);
+ }
+ },
+/**
+###*layer*.`features([options])`
+_version added 0.2.0_
+####**Description**: get/set the features of a (vector) layer
+
+**options** an object of key-value pairs with options to create one or
+more features
+
+>Returns: [features] (array of MapQuery.Feature)
+
+
+The `.features()` method allows us to attach features to a mapQuery layer
+object. It takes an options object with feature options. To add multiple
+features, create an array of feature options objects. If an options object
+is given, it will return the resulting feature(s). We can also use it to
+retrieve all features currently attached to the layer.
+
+
+ // add an (vector) json layer to the map
+ var jsonlayer = map.layers({type:'json'});
+ // add a feature to the layer
+ jsonlayer.features({geometry: {type: "Point", coordinates: [5.3, 7.4]}});
+ // get all features of a layer (sorted with first added feature at the beginning
+ var features = jsonlayer.features();
+*/
+ features: function(options) {
+ var self = this;
+ switch(arguments.length) {
+ // return all features
+ case 0:
+ return this._allFeatures();
+ // add new feature(s)
+ case 1:
+ if (!$.isArray(options)) {
+ return this._addFeature(options);
+ }
+ else {
+ return $.map(options, function(feature) {
+ return self._addFeature(feature);
+ });
+ }
+ break;
+ default:
+ throw('wrong argument number');
+ }
},
- one: function() {
- this.events.one.apply(this.events, arguments);
+ _allFeatures: function() {
+ var layer = this;
+ return $.map(layer.olLayer.features, function(feature) {
+ return new $.MapQuery.Feature(layer, {olFeature: feature});
+ });
+ },
+ _addFeature: function(options) {
+ var feature = new $.MapQuery.Feature(this, options);
+ // NOTE vmx 2012-04-19: Not sure if this is a good idea, or if it would
+ // be better to include `options` with the preaddfeature event
+ if (this._triggerReturn('preaddfeature', [feature])===false) {
+ return false;
+ }
+ this.olLayer.addFeatures(feature.olFeature);
+ this.trigger('addfeature', [feature]);
+ return feature;
+ }
+};
+
+/**
+#MapQuery.Feature
+
+The MapQuery.Feature object. It is constructed with a feature options object
+in the layer.`features([options])` function. The Feautre object is refered to
+as _feature_ in the documentation.
+
+TODO vmx 20110905: Support other geometry types than GeoJSON
+options:
+ * geometry: A GeoJSON geometry
+ * properties: Properties for the feature
+*/
+// Not in the pulic API docs: You can pass in as options:
+// * olFeature: This will wrap the olFeature in a MapQuery feature
+$.MapQuery.Feature = function(layer, options) {
+ // The ID is the
+ this._id = layer.map._createId();
+ this.layer = layer;
+
+ // Feature already exists on the layer, it just needs to be wrapped
+ // to an MapQuery feature
+ if (options.olFeature) {
+ this.olFeature = options.olFeature;
+ }
+ else {
+ // XXX vmx 20110905: Different feature types might make sense:
+ // (Geo)JSON, KML, WKT
+ // vmx 2012-04-14: I changed my mind quite some time ago. We should onlu
+ // support GeoJSON and let the user easily transfrom their format
+ // (e.g. KML) to GeoJSON, before they add a feature to the layer
+ var GeoJSON = new OpenLayers.Format.GeoJSON();
+ var geometry = GeoJSON.parseGeometry(options.geometry);
+ geometry.transform(
+ new OpenLayers.Projection(this.layer.map.displaProjection),
+ new OpenLayers.Projection(this.layer.map.projection));
+
+ this.olFeature = new OpenLayers.Feature.Vector(geometry,
+ options.properties);
+ }
+
+ // Modify the features to be more practical
+ // e.g. copy properties that should be easily accessed from the
+ // outside, out of the olLayer and to the feature level
+ this.properties = $.extend(true, {}, this.olFeature.attributes);
+ this.geometry = $.parseJSON(
+ new OpenLayers.Format.GeoJSON().write(this.olFeature.geometry));
+
+ return this;
+};
+
+$.MapQuery.Feature.prototype = {
+/**
+###*feature*.`remove()`
+_version added 0.2.0_
+####**Description**: remove the feature from the layer
+
+>Returns: layer (layer) or false
+
+
+The `.remove()` method allows us to remove a feature from the layer.
+It returns the `layer` object if the feature was removed, or `false` if the
+removal was prevented in the preremovefeature event.
+
+ // add a feature to a layer
+ var feature = layer.features({geometry: {type: "Point", coordinates: [5.3, 7.4]}});
+ // remove the feature again
+ feature.remove();
+*/
+ remove: function() {
+ if (this.layer._triggerReturn('preremovefeature', [this])===false) {
+ return false;
+ }
+ this.layer.olLayer.removeFeatures(this.olFeature);
+ // The `removefeature` event is triggered by an OpenLayes event handler
+ return this.layer;
+ },
+/**
+###*feature*.`select(exclusive)`
+_version added 0.2.0_
+####**Description**: select a feature
+
+**exclusive** (boolean, default: true) True means that all other features get
+deselectd
+
+>Returns: layer (layer)
+
+
+The `.select()` method allows us to select a feature from the layer.
+A `featureselected` will be fired.
+
+ // add a feature to a layer
+ var feature = layer.features({geometry: {type: "Point", coordinates: [5.3, 7.4]}});
+ // select the feature again
+ feature.select();
+*/
+ select: function(exclusive) {
+ if (exclusive===undefined || exclusive===true) {
+ this.layer.map.selectFeatureControl.unselectAll();
+ }
+ this.layer.map.selectFeatureControl.select(this.olFeature);
+ },
+/**
+###*feature*.`unselect()`
+_version added 0.2.0_
+####**Description**: unselect a feature
+
+>Returns: layer (layer)
+
+
+The `.unselect()` method allows us to unselect a feature from the layer.
+A `featureunselected` will be fired.
+
+ // add a feature to a layer
+ var feature = layer.features({geometry: {type: "Point", coordinates: [5.3, 7.4]}});
+ // select the feature
+ feature.select();
+ // unselect the feature again
+ feature.unselect();
+*/
+ unselect: function() {
+ this.layer.map.selectFeatureControl.unselect(this.olFeature);
}
};
@@ -581,11 +990,11 @@ $.extend($.MapQuery.Layer, {
_version added 0.1_
####**Description**: create a Bing maps layer
-**view** a string ['road','hybrid','satellite'] to define which Bing maps
+ * **view** a string ['road','hybrid','satellite'] to define which Bing maps
layer to use (default road)
-**key** Bing Maps API key for your application. Get you own at
+ * **key** Bing Maps API key for your application. Get you own at
http://bingmapsportal.com/
-**label** string with the name of the layer
+ * **label** string with the name of the layer
layers:[{
@@ -629,9 +1038,9 @@ http://bingmapsportal.com/
_version added 0.1_
####**Description**: create a Google maps layer
-**view** a string ['road','hybrid','satellite'] to define which Google maps
+ * **view** a string ['road','hybrid','satellite'] to define which Google maps
layer to use (default road)
-**label** string with the name of the layer
+ * **label** string with the name of the layer
*Note* you need to include the google maps v3 API in your application by adding
@@ -669,7 +1078,7 @@ layer to use (default road)
_version added 0.1_
####**Description**: create a vector layer
-**label** string with the name of the layer
+ * **label** string with the name of the layer
layers:[{
@@ -692,13 +1101,13 @@ _version added 0.1_
_version added 0.1_
####**Description**: create a JSON layer
-**url** a string pointing to the location of the JSON data
-**strategies** a string ['bbox','cluster','filter','fixed','paging','refresh','save']
+ * **url** a string pointing to the location of the JSON data
+ * **strategies** a string ['bbox','cluster','filter','fixed','paging','refresh','save']
stating which update strategy should be used (default fixed)
(see also http://dev.openlayers.org/apidocs/files/OpenLayers/Strategy-js.html)
-**projection** a string with the projection of the JSON data (default EPSG:4326)
-**styleMap** {object} the style to be used to render the JSON data
-**label** string with the name of the layer
+ * **projection** a string with the projection of the JSON data (default EPSG:4326)
+ * **styleMap** {object} the style to be used to render the JSON data
+ * **label** string with the name of the layer
layers:[{
@@ -710,8 +1119,8 @@ stating which update strategy should be used (default fixed)
*/
json: function(options) {
var o = $.extend(true, {}, $.fn.mapQuery.defaults.layer.all,
- $.fn.mapQuery.defaults.layer.vector,
- options);
+ $.fn.mapQuery.defaults.layer.vector,
+ options);
this.isVector = true;
var strategies = [];
for (var i in o.strategies) {
@@ -742,26 +1151,31 @@ stating which update strategy should be used (default fixed)
}
}
var protocol;
- // only use JSONP if we use http(s)
- if (o.url.match(/^https?:\/\//)!==null &&
- !$.MapQuery.util.sameOrigin(o.url)) {
- protocol = 'Script';
- }
- else {
- protocol = 'HTTP';
- }
var params = {
- protocol: new OpenLayers.Protocol[protocol]({
- url: o.url,
- format: new OpenLayers.Format.GeoJSON()
- }),
strategies: strategies,
projection: o.projection || 'EPSG:4326',
styleMap: o.styleMap
};
+
+ if (o.url) {
+ // only use JSONP if we use http(s)
+ if (o.url.match(/^https?:\/\//)!==null &&
+ !$.MapQuery.util.sameOrigin(o.url)) {
+ protocol = 'Script';
+ }
+ else {
+ protocol = 'HTTP';
+ }
+ params.protocol = new OpenLayers.Protocol[protocol]({
+ url: o.url,
+ format: new OpenLayers.Format.GeoJSON()
+ });
+ };
+
+ var layer = new OpenLayers.Layer.Vector(o.label, params);
return {
- layer: new OpenLayers.Layer.Vector(o.label, params),
+ layer: layer,
options: o
};
},
@@ -771,10 +1185,10 @@ _version added 0.1_
####**Description**: create an OpenStreetMap layer
-**label** string with the name of the layer
-**url** A single URL (string) or an array of URLs to OSM-like server like
+ * **label** string with the name of the layer
+ * **url** A single URL (string) or an array of URLs to OSM-like server like
Cloudmade
-**attribution** A string to put some attribution on the map
+ * **attribution** A string to put some attribution on the map
layers:[{
type: 'osm',
@@ -801,15 +1215,51 @@ Cloudmade
};
},
/**
+###*layer* `{type:tms}`
+_version added 0.1_
+####**Description**: create an OpenStreetMap layer
+
+
+ * **label** string with the name of the layer
+ * **url** A single URL (string) or an array of URLs to the TMS end point
+ * **layer** The identifier for the <TileMap> as advertised by the service.
+ For example, if the service advertises a <TileMap> with ‘href=”http://tms.osgeo.org/1.0.0/vmap0”’,
+ the layer property would be set to “vmap0”.
+ * **format** The image format (default png)
+
+ layers:[{
+ type: 'tms',
+ url: 'http://tilecache.osgeo.org/wms-c/Basic.py/',
+ layer: 'basic'
+ }]
+
+*/
+ tms: function(options) {
+ var o = $.extend(true, {}, $.fn.mapQuery.defaults.layer.all,
+ $.fn.mapQuery.defaults.layer.tms,
+ options);
+ var label = options.label || undefined;
+ var url = options.url || undefined;
+ var params = {
+ layername: o.layer,
+ type: o.format
+ };
+ return {
+ layer: new OpenLayers.Layer.TMS(label, url, params),
+ options: o
+ };
+ },
+/**
###*layer* `{type:wms}`
_version added 0.1_
####**Description**: create a WMS layer
-**url** a string pointing to the location of the WMS service
-**layers** a string with the name of the WMS layer(s)
-**format** a string with format of the WMS image (default image/jpeg)
-**transparent** a boolean for requesting images with transparency
-**label** string with the name of the layer
+ * **url** a string pointing to the location of the WMS service
+ * **layers** a string with the name of the WMS layer(s)
+ * **format** a string with format of the WMS image (default image/jpeg)
+ * **transparent** a boolean for requesting images with transparency
+ * **label** string with the name of the layer
+ * **wms_parameters** an hashtable of extra GetMap query string parameters and parameter values
layers:[{
@@ -828,6 +1278,9 @@ _version added 0.1_
transparent: o.transparent,
format: o.format
};
+ if(typeof o.wms_parameters != "undefined"){
+ params = $.extend(params, o.wms_parameters);
+ }
return {
layer: new OpenLayers.Layer.WMS(o.label, o.url, params, o),
options: o
@@ -839,11 +1292,11 @@ _version added 0.1_
_version added 0.1_
####**Description**: create a WMTS (tiling) layer
-**url** a string pointing to the location of the WMTS service
-**layer** a string with the name of the WMTS layer
-**matrixSet** a string with one of the advertised matrix set identifiers
-**style** a string with one of the advertised layer styles
-**label** string with the name of the layer
+ * **url** a string pointing to the location of the WMTS service
+ * **layer** a string with the name of the WMTS layer
+ * **matrixSet** a string with one of the advertised matrix set identifiers
+ * **style** a string with one of the advertised layer styles
+ * **label** string with the name of the layer
layers:[{
@@ -953,13 +1406,17 @@ $.fn.mapQuery.defaults = {
transitionEffect: 'resize',
sphericalMercator: true
},
+ tms: {
+ transitionEffect: 'resize',
+ format: 'png'
+ },
raster: {
// options for raster layers
transparent: true
},
vector: {
// options for vector layers
- strategies: ['fixed']
+ strategies: ['bbox']
},
wmts: {
format: 'image/jpeg',
diff --git a/view/theme/diabook/js/jquery.mapquery.legend.js b/view/theme/diabook/js/jquery.mapquery.legend.js
new file mode 100644
index 000000000..0a475408f
--- /dev/null
+++ b/view/theme/diabook/js/jquery.mapquery.legend.js
@@ -0,0 +1,87 @@
+/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for
+ * full list of contributors). Published under the MIT license.
+ * See https://github.com/mapquery/mapquery/blob/master/LICENSE for the
+ * full text of the license. */
+
+/**
+#jquery.mapquery.legend.js
+A plugin on mapquery.core to add a legend to a layer. It will check if the layer
+is within a valid extent and zoom range. And if not will return an error message.
+*/
+
+(function($, MQ) {
+$.extend( $.fn.mapQuery.defaults.layer.all, {
+ legend: {
+ url: '',
+ msg: ''
+ }
+});
+//possible error messages to display in the legend
+LEGEND_ERRORS= ['E_ZOOMOUT', 'E_ZOOMIN', 'E_OUTSIDEBOX'];
+$.extend(MQ.Layer.prototype, {
+/**
+###**layer**.`legend([options])`
+_version added 0.1_
+####**Description**: get/set the legend of a layer
+
+**options** url:url the url to the legend image
+
+>Returns: {url:url, msg:'E\_ZOOMOUT' | 'E\_ZOOMIN' | 'E\_OUTSIDEBOX' | ''}
+
+
+The `.legend()` function allows us to attach a legend image to a layer. It will
+also check if the layer is not visible due to wrong extent or zoom level.
+It will return an error message which can be used to notify the user.
+
+
+ var legend = layer.legend(); //get the current legend
+ //set the legend url to legendimage.png
+ layer.legend({url:'legendimage.png'})
+
+ */
+ //get/set the legend object
+ legend: function(options) {
+ //get the legend object
+ var center = this.map.center();
+ if (arguments.length===0) {
+ this._checkZoom(center);
+ //if zoom = ok, check box
+ if(this.options.legend.msg==''){
+ this._checkBox(center);
+ }
+ return this.options.legend;
+ }
+ //set the legend url
+ if (options.url!==undefined) {
+ this.options.legend.url = options.url;
+ return this.options.legend;
+ }
+ },
+ //Check if the layer has a maximum box set and if the current box
+ //is outside these settings, set the legend.msg accordingly
+ _checkBox: function(center){
+ var maxExtent = this.options.maxExtent;
+ if(maxExtent!==undefined) {
+ var mapBounds = new OpenLayers.Bounds(
+ center.box[0],center.box[1],center.box[2],center.box[3]);
+ var layerBounds = new OpenLayers.Bounds(
+ maxExtent[0],maxExtent[1],maxExtent[2],maxExtent[3]);
+ var inside = layerBounds.containsBounds(mapBounds, true);
+ this.options.legend.msg = inside?'':LEGEND_ERRORS[2];
+ }
+ },
+ //Check if the layer has a minimum or maximum zoom set and if the
+ //current zoom is outside these settings, set the legend.msg accordingly
+ _checkZoom: function(center){
+ var zoom = center.zoom;
+ var maxZoom = this.options.maxZoom;
+ var minZoom = this.options.minZoom;
+ this.options.legend.msg=(
+ maxZoom!==undefined&&maxZoom<zoom)? LEGEND_ERRORS[0]:'';
+ this.options.legend.msg=(
+ minZoom!==undefined&&minZoom>zoom)? LEGEND_ERRORS[1]:'';
+ }
+
+});
+
+})(jQuery, $.MapQuery);
diff --git a/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js b/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js
new file mode 100644
index 000000000..885330cf1
--- /dev/null
+++ b/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js
@@ -0,0 +1,310 @@
+/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for
+ * full list of contributors). Published under the MIT license.
+ * See https://github.com/mapquery/mapquery/blob/master/LICENSE for the
+ * full text of the license. */
+
+/**
+#jquery.mapquery.mqLayerManager.js
+The file containing the mqLayerManager Widget
+
+### *$('selector')*.`mqLayerManager([options])`
+_version added 0.1_
+####**Description**: create a widget to manage layers
+
+ + **options**:
+ - **map**: the mapquery instance
+ - **title**: Title that will be displayed at the top of the
+ layer manager (default: Layer Manager)
+
+
+>Returns: widget
+
+>Requires: jquery.mapquery.legend.js
+
+
+The mqLayerManager allows us to control the order, opacity and visibility
+of layers. We can also remove layers. It also shows the legend of the layer if
+available and the error messages provided by the legend plugin. It listens to
+layerchange event for order, transparancy and opacity changes. It listens to
+addlayer and removelayer events to keep track which layers are on the map.
+
+
+ $('#layermanager').mqLayerManager({map:'#map'});
+
+
+ */
+(function($) {
+$.template('mqLayerManager',
+ '<div class="mq-layermanager ui-widget-content ">'+
+ '</div>');
+
+$.template('mqLayerManagerElement',
+ '<div class="mq-layermanager-element ui-widget-content ui-corner-all" id="mq-layermanager-element-${id}">'+
+ '<div class="mq-layermanager-element-header ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">'+
+ '<span class="mq-layermanager-label ui-dialog-title">${label}</span>'+
+ '<a class="ui-dialog-titlebar-close ui-corner-all" href="#" role="button">'+
+ '<span class="ui-icon ui-icon-closethick">close</span></a></div>'+
+ '<div class="mq-layermanager-element-content">'+
+ '<div class="mq-layermanager-element-visibility">'+
+ '<input type="checkbox" class="mq-layermanager-element-vischeckbox" id="${id}-visibility" {{if visible}}checked="${visible}"{{/if}} />'+
+ '<div class="mq-layermanager-element-slider-container">'+
+ '<div class="mq-layermanager-element-slider"></div></div>'+
+ '</div>'+
+ '<div class="mq-layermanager-element-legend">'+
+ '{{if imgUrl}}'+
+ '<img src="${imgUrl}" style="opacity:${opacity}"/>'+
+ '{{/if}}'+
+ '{{if errMsg}}'+
+ '${errMsg}'+
+ '{{/if}}'+
+ '</div>'+
+ '</div>'+
+ '</div>');
+
+$.widget("mapQuery.mqLayerManager", {
+ options: {
+ // The MapQuery instance
+ map: undefined,
+
+ // Title that will be displayed at the top of the popup
+ title: "Layer Manager"
+ },
+ _create: function() {
+ var map;
+ var zoom;
+ var numzoomlevels;
+ var self = this;
+ var element = this.element;
+
+ //get the mapquery object
+ map = $(this.options.map).data('mapQuery');
+
+ this.element.addClass('ui-widget ui-helper-clearfix ' +
+ 'ui-corner-all');
+
+ var lmElement = $.tmpl('mqLayerManager').appendTo(element);
+ element.find('.ui-icon-closethick').button();
+
+ lmElement.sortable({
+ axis:'y',
+ handle: '.mq-layermanager-element-header',
+ update: function(event, ui) {
+ var layerNodes = ui.item.siblings().andSelf();
+ var num = layerNodes.length-1;
+ layerNodes.each(function(i) {
+ var layer = $(this).data('layer');
+ var pos = num-i;
+ self._position(layer, pos);
+ });
+ }
+ });
+
+ //these layers are already added to the map as such won't trigger
+ //and event, we call the draw function directly
+ $.each(map.layers().reverse(), function(){
+ self._layerAdded(lmElement, this);
+ });
+
+ element.delegate('.mq-layermanager-element-vischeckbox',
+ 'change',function() {
+ var checkbox = $(this);
+ var element = checkbox.parents('.mq-layermanager-element');
+ var layer = element.data('layer');
+ var self = element.data('self');
+ self._visible(layer,checkbox.is(':checked'));
+ });
+
+ element.delegate('.ui-icon-closethick', 'click', function() {
+ var control = $(this).parents('.mq-layermanager-element');
+ self._remove(control.data('layer'));
+ });
+
+ //binding events
+ map.bind("addlayer",
+ {widget:self,control:lmElement},
+ self._onLayerAdd);
+
+ map.bind("removelayer",
+ {widget:self,control:lmElement},
+ self._onLayerRemove);
+
+ map.bind("changelayer",
+ {widget:self,map:map,control:lmElement},
+ self._onLayerChange);
+
+ map.bind("moveend",
+ {widget:self,map:map,control:lmElement},
+ self._onMoveEnd);
+ },
+ _destroy: function() {
+ this.element.removeClass(' ui-widget ui-helper-clearfix ' +
+ 'ui-corner-all')
+ .empty();
+ },
+ //functions that actually change things on the map
+ //call these from within the widget to do stuff on the map
+ //their actions will trigger events on the map and in return
+ //will trigger the _layer* functions
+ _add: function(map,layer) {
+ map.layers(layer);
+ },
+
+ _remove: function(layer) {
+ layer.remove();
+ },
+
+ _position: function(layer, pos) {
+ layer.position(pos);
+ },
+
+ _visible: function(layer, vis) {
+ layer.visible(vis);
+ },
+
+ _opacity: function(layer,opac) {
+ layer.opacity(opac);
+ },
+
+ //functions that change the widget
+ _layerAdded: function(widget, layer) {
+ var self = this;
+ var error = layer.legend().msg;
+ var url;
+ switch(error){
+ case '':
+ url =layer.legend().url;
+ if(url==''){error='No legend for this layer';}
+ break;
+ case 'E_ZOOMOUT':
+ error = 'Please zoom out to see this layer';
+ break;
+ case 'E_ZOOMIN':
+ error = 'Please zoom in to see this layer';
+ break;
+ case 'E_OUTSIDEBOX':
+ error = 'This layer is outside the current view';
+ break;
+ }
+
+ var layerElement = $.tmpl('mqLayerManagerElement',{
+ id: layer.id,
+ label: layer.label,
+ position: layer.position(),
+ visible: layer.visible(),
+ imgUrl: url,
+ opacity: layer.visible()?layer.opacity():0,
+ errMsg: error
+ })
+ // save layer layer in the DOM, so we can easily
+ // hide/show/delete the layer with live events
+ .data('layer', layer)
+ .data('self',self)
+ .prependTo(widget);
+
+ $(".mq-layermanager-element-slider", layerElement).slider({
+ max: 100,
+ step: 1,
+ value: layer.visible()?layer.opacity()*100:0,
+ slide: function(event, ui) {
+ var layer = layerElement.data('layer');
+ var self = layerElement.data('self');
+ self._opacity(layer,ui.value/100);
+ },
+ //using the slide event to check for the checkbox often gives errors.
+ change: function(event, ui) {
+ var layer = layerElement.data('layer');
+ var self = layerElement.data('self');
+ if(ui.value>=0.01) {
+ if(!layer.visible()){layer.visible(true);}
+ }
+ if(ui.value<0.01) {
+ if(layer.visible()){layer.visible(false);}
+ }
+ }
+ });
+ },
+
+ _layerRemoved: function(widget, id) {
+ var control = $("#mq-layermanager-element-"+id);
+ control.fadeOut(function() {
+ $(this).remove();
+ });
+ },
+
+ _layerPosition: function(widget, layer) {
+ var layerNodes = widget.element.find('.mq-layermanager-element');
+ var num = layerNodes.length-1;
+ var tmpNodes = [];
+ tmpNodes.length = layerNodes.length;
+ layerNodes.each(function() {
+ var layer = $(this).data('layer');
+ var pos = num-layer.position();
+ tmpNodes[pos]= this;
+ });
+ for (i=0;i<tmpNodes.length;i++) {
+ layerNodes.parent().append(tmpNodes[i]);
+ }
+ },
+
+ _layerVisible: function(widget, layer) {
+ var layerElement =
+ widget.element.find('#mq-layermanager-element-'+layer.id);
+ var checkbox =
+ layerElement.find('.mq-layermanager-element-vischeckbox');
+ checkbox[0].checked = layer.visible();
+ //update the opacity slider as well
+ var slider = layerElement.find('.mq-layermanager-element-slider');
+ var value = layer.visible()?layer.opacity()*100: 0;
+ slider.slider('value',value);
+
+ //update legend image
+ layerElement.find('.mq-layermanager-element-legend img').css(
+ {visibility:layer.visible()?true:'hidden'});
+ },
+
+ _layerOpacity: function(widget, layer) {
+ var layerElement = widget.element.find(
+ '#mq-layermanager-element-'+layer.id);
+ var slider = layerElement.find(
+ '.mq-layermanager-element-slider');
+ slider.slider('value',layer.opacity()*100);
+ //update legend image
+ layerElement.find(
+ '.mq-layermanager-element-legend img').css(
+ {opacity:layer.opacity()});
+ },
+
+ _moveEnd: function (widget,lmElement,map) {
+ lmElement.empty();
+ $.each(map.layers().reverse(), function(){
+ widget._layerAdded(lmElement, this);
+ });
+ },
+
+ //functions bind to the map events
+ _onLayerAdd: function(evt, layer) {
+ evt.data.widget._layerAdded(evt.data.control,layer);
+ },
+
+ _onLayerRemove: function(evt, layer) {
+ evt.data.widget._layerRemoved(evt.data.control,layer.id);
+ },
+
+ _onLayerChange: function(evt, layer, property) {
+ switch(property) {
+ case 'opacity':
+ evt.data.widget._layerOpacity(evt.data.widget,layer);
+ break;
+ case 'position':
+ evt.data.widget._layerPosition(evt.data.widget,layer);
+ break;
+ case 'visibility':
+ evt.data.widget._layerVisible(evt.data.widget,layer);
+ break;
+ }
+ },
+ _onMoveEnd: function(evt) {
+ evt.data.widget._moveEnd(evt.data.widget,evt.data.control,evt.data.map);
+ }
+});
+})(jQuery);
diff --git a/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js b/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js
index d4370bfe4..9f7e151ff 100644
--- a/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js
+++ b/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js
@@ -44,8 +44,8 @@ $.widget("mapQuery.mqMousePosition", {
// The number of decimals for the coordinates
// default: 2
- // TODO: JCB20110630 use dynamic precision based on the pixel
- // resolution, no need to configure precision
+ // TODO: JCB20110630 use dynamic precision based on the pixel
+ // resolution, no need to configure precision
precision: 2,
// The label of the x-value
@@ -57,51 +57,36 @@ $.widget("mapQuery.mqMousePosition", {
},
_create: function() {
- var map;
- var self = this;
- var element = this.element;
- var mousepos;
-
//get the mapquery object
- map = $(this.options.map).data('mapQuery');
-
- map.bind("mousemove",
- {widget:self,map:map},
- self._onMouseMove);
-
+ this.map = $(this.options.map).data('mapQuery');
- $.tmpl('mqMousePosition',{
- mouseposition:mousepos
- }).appendTo(element);
+ this.map.element.bind('mousemove', {widget: this}, this._onMousemove);
+ $.tmpl('mqMousePosition', {}).appendTo(this.element);
},
_destroy: function() {
- this.element.removeClass(' ui-widget ui-helper-clearfix ' +
+ this.element.removeClass('ui-widget ui-helper-clearfix ' +
'ui-corner-all')
.empty();
},
- _mouseMoved: function(data, element, map) {
- var x = data.layerX;
- var y = data.layerY;
- var mapProjection = map.options.projection;
- var displayProjection = map.options.projection;
+ _onMousemove: function(evt) {
+ var self = evt.data.widget;
+ var x = evt.pageX;
+ var y = evt.pageY;
+ var mapProjection = new OpenLayers.Projection(self.map.projection);
+ var displayProjection = new OpenLayers.Projection(
+ self.map.displayProjection);
+ var pos = self.map.olMap.getLonLatFromLayerPx(
+ new OpenLayers.Pixel(x, y));
//if the coordinates should be displayed in something else,
- //set them via the map displayProjection option
- var pos = map.olMap.getLonLatFromLayerPx(new OpenLayers.Pixel(x,y));
- if(map.options.displayProjection) {
- displayProjection = map.options.displayProjection;
- pos=pos.transform(
- new OpenLayers.Projection(mapProjection),
- new OpenLayers.Projection(displayProjection));
+ //set them via the map displayProjection option
+ if(!mapProjection.equals(self.map.displayProjection)) {
+ pos = pos.transform(mapProjection, displayProjection);
}
- $("#id_diabook_ELPosX", element).val(
- this.options.x+pos.lon.toFixed(this.options.precision));
- $("#id_diabook_ELPosY", element).val(
- this.options.y+pos.lat.toFixed(this.options.precision));
- },
-
- _onMouseMove: function(evt, data) {
- evt.data.widget._mouseMoved(data,evt.data.control,evt.data.map);
+ $("#id_diabook_ELPosX", document.element).val(
+ self.options.x + pos.lon.toFixed(self.options.precision));
+ $("#id_diabook_ELPosY", document.element).val(
+ self.options.y + pos.lat.toFixed(self.options.precision));
}
});
})(jQuery);
diff --git a/view/theme/diabook/js/jquery.twitter.search.js b/view/theme/diabook/js/jquery.twitter.search.js
index d3ccfe68e..a57bd255d 100644
--- a/view/theme/diabook/js/jquery.twitter.search.js
+++ b/view/theme/diabook/js/jquery.twitter.search.js
@@ -202,7 +202,7 @@
// default styling
a: { textDecoration: 'none', color: '#3B5998' },
bird: { width: '50px', height: '20px', position: 'absolute', left: '-30px', top: '-20px', border: 'none' },
- container: { overflow: 'hidden', backgroundColor: '', height: '600px' },
+ container: { overflow: 'hidden', backgroundColor: '', height: '600px', width: '170px' },
fail: { background: '#6cc5c3 url(http://cloud.github.com/downloads/malsup/twitter/failwhale.png) no-repeat 50% 50%', height: '100%', padding: '10px' },
frame: { border: '0px solid #C2CFF1', borderRadius: '0px', '-moz-border-radius': '0px', '-webkit-border-radius': '0px' },
tweet: { padding: '5px 10px', clear: 'left' },
diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl
index f611de004..4165656bd 100644
--- a/view/theme/diabook/nav.tpl
+++ b/view/theme/diabook/nav.tpl
@@ -136,7 +136,7 @@
</nav>
-<div id="scrollup" style="position: fixed; bottom: 5px; right: 10px;z-index: 97;"><a id="down" onclick="scrolldown()" ><img id="scroll_top_bottom" src="view/theme/diabook/icons/scroll_bottom.png" style="display:cursor !important;" alt="back to top" title="Back to top"></a></div>
+<div id="scrollup" style="position: fixed; bottom: 5px; right: 10px;z-index: 97;"><a id="down" onclick="scrolldown()" ><img id="scroll_top_bottom" src="view/theme/diabook/icons/scroll_bottom.png" style="display:cursor !important;" alt="back to top" title="Scroll to bottom"></a></div>
<div style="position: fixed; bottom: 3px; left: 25px;">$langselector</div>
<div style="position: fixed; bottom: 23px; left: 5px;"><a href="http://pad.toktan.org/p/diabook" target="blank" ><img src="view/theme/diabook/icons/bluebug.png" title="report bugs for the theme diabook"/></a></div>
diff --git a/view/theme/diabook/prv_message.tpl b/view/theme/diabook/prv_message.tpl
new file mode 100644
index 000000000..c59cc622f
--- /dev/null
+++ b/view/theme/diabook/prv_message.tpl
@@ -0,0 +1,40 @@
+
+<h3>$header</h3>
+
+<div id="prvmail-wrapper" >
+<form id="prvmail-form" action="message" method="post" >
+
+$parent
+
+<div id="prvmail-to-label">$to</div>
+
+{{ if $showinputs }}
+<input type="text" id="recip" style="background: none repeat scroll 0 0 white;border: 1px solid #CCC;border-radius: 5px 5px 5px 5px;height: 20px;margin: 0 0 5px;
+vertical-align: middle;" name="messageto" value="$prefill" maxlength="255" size="64" tabindex="10" />
+<input type="hidden" id="recip-complete" name="messageto" value="$preid">
+{{ else }}
+$select
+{{ endif }}
+
+<div id="prvmail-subject-label">$subject</div>
+<input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" value="$subjtxt" $readonly tabindex="11" />
+
+<div id="prvmail-message-label">$yourmessage</div>
+<textarea rows="8" cols="72" class="prvmail-text" id="prvmail-text" name="body" tabindex="12">$text</textarea>
+
+
+<div id="prvmail-submit-wrapper" >
+ <input type="submit" id="prvmail-submit" name="submit" value="Submit" tabindex="13" />
+ <div id="prvmail-upload-wrapper" >
+ <div id="prvmail-upload" class="icon border camera" title="$upload" ></div>
+ </div>
+ <div id="prvmail-link-wrapper" >
+ <div id="prvmail-link" class="icon border link" title="$insert" onclick="jotGetLink();" ></div>
+ </div>
+ <div id="prvmail-rotator-wrapper" >
+ <img id="prvmail-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
+ </div>
+</div>
+<div id="prvmail-end"></div>
+</form>
+</div>
diff --git a/view/theme/diabook/style-wide.css b/view/theme/diabook/style-wide.css
index cf54e5b58..64393bdff 100644
--- a/view/theme/diabook/style-wide.css
+++ b/view/theme/diabook/style-wide.css
@@ -610,9 +610,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 2834e76f2..736817c7b 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -611,9 +611,7 @@ header #banner #logo-img {
margin-top: 3px;
}
header #banner #logo-text {
- font-size: 20px;
- position: absolute;
- top: 10%;
+ font-size: 20px!important;position: relative!important;top: -4px!important;
}
/* messages */
#message-new {
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 607414f17..de7e41841 100755
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -3,7 +3,7 @@
/*
* Name: Diabook
* Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
- * Version: (Version: 1.026)
+ * Version: (Version: 1.027)
* Author:
*/
@@ -13,12 +13,12 @@ $a = get_app();
function diabook_init(&$a) {
//print diabook-version for debugging
-$diabook_version = "Diabook (Version: 1.026)";
-$a->page['htmlhead'] .= sprintf('<META NAME="theme" CONTENT="%s"/>', $diabook_version);
+$diabook_version = "Diabook (Version: 1.027)";
+$a->page['htmlhead'] .= sprintf('<META NAME=generator CONTENT="%s"/>', $diabook_version);
-//change css on network and profilepages
+//init css on network and profilepages
$cssFile = null;
-
+//get statuses of boxes at right-hand-column
$close_pages = false;
$site_close_pages = get_config("diabook", "close_pages" );
if (local_user()) {$close_pages = get_pconfig(local_user(), "diabook", "close_pages");}
@@ -79,7 +79,7 @@ if (local_user()) {$close_mapquery = get_pconfig(local_user(), "diabook", "close
if ($close_mapquery===false) $close_mapquery=$site_close_mapquery;
if ($close_mapquery===false) $close_mapquery="1";
-
+//get resolution (wide/normal)
$resolution=false;
$resolution = get_pconfig(local_user(), "diabook", "resolution");
if ($resolution===false) $resolution="normal";
@@ -90,8 +90,7 @@ if ($resolution=="wide") {
} else {
$a->page['htmlhead'] .= '<meta name="viewport" content="width=980" />';
}
-
-
+//get colour-scheme
$color = false;
$site_color = get_config("diabook", "color" );
if (local_user()) {$color = get_pconfig(local_user(), "diabook", "color");}
@@ -107,7 +106,7 @@ if ($color=="green") $color_path = "/diabook-green/";
if ($color=="dark") $color_path = "/diabook-dark/";
- //profile_side at networkpages
+ //build personal menue at lefthand-col (id="profile_side") and boxes at right-hand-col at networkpages
if ($a->argv[0] === "network" && local_user()){
// USER MENU
@@ -139,6 +138,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
}
$ccCookie = $close_pages + $close_mapquery + $close_profiles + $close_helpers + $close_services + $close_friends + $close_twitter + $close_lastusers + $close_lastphotos + $close_lastlikes;
+ //if all boxes closed, dont build right-hand-col and dont use special css
if($ccCookie != "10") {
// COMMUNITY
diabook_community_info();
@@ -151,7 +151,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
- //right_aside at profile pages
+ //build boxes at right_aside at profile pages
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
if($ccCookie != "10") {
// COMMUNITY
@@ -164,46 +164,45 @@ if ($color=="dark") $color_path = "/diabook-dark/";
}
}
- //js scripts
+ //write js-scripts to the head-section:
//load jquery.cookie.js
$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.cookie.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s"></script>', $cookieJS);
-
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s"></script>', $cookieJS);
//load jquery.ae.image.resize.js
- $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS);
-
+ $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.min.js";
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $imageresizeJS);
//load jquery.ui.js
if($ccCookie != "10") {
$jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $jqueryuiJS);
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $jqueryuiJS);
+ $jqueryuicssJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/jquery-ui-1.8.20.custom.css";
+ $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $jqueryuicssJS);
}
-
//load jquery.twitter.search.js
if($close_twitter != "1") {
$twitterJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.twitter.search.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $twitterJS);
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $twitterJS);
}
-
//load jquery.mapquery.js
-
if($close_mapquery != "1") {
$mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $mqtmplJS);
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $mqtmplJS);
$mapqueryJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.core.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $mapqueryJS);
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $mapqueryJS);
$openlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/OpenLayers.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $openlayersJS);
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $openlayersJS);
$mqmouseposJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $mqmouseposJS);
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $mqmouseposJS);
$mousewheelJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mousewheel.js";
- $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $mousewheelJS);
-
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $mousewheelJS);
+ $mqlegendJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.legend.js";
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $mqlegendJS);
+ $mqlayermanagerJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js";
+ $a->page['htmlhead'] .= sprintf('<script type="text/javascript" src="%s" ></script>', $mqlayermanagerJS);
}
$a->page['htmlhead'] .= '
<script>
-
$(function() {
$("a.lightbox").fancybox(); // Select all links with lightbox class
$("a#twittersettings-link").fancybox({onClosed: function() { $("#twittersettings").attr("style","display: none;");}} );
@@ -216,8 +215,8 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$("div#footerbox").attr("style", "border-top: 1px solid #D2D2D2; width: 70%;right: 15%;position: absolute;top:"+footer_top+"px;");
});
</script>';
+
//check if mapquerybox is active and print
-
if($close_mapquery != "1") {
$ELZoom=false;
$ELPosX=false;
@@ -237,7 +236,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$a->page['htmlhead'] .= '
<script>
- $(document).ready(function() {
+ $(function() {
$("#map").mapQuery({
layers:[{ //add layers to your map; you need to define at least one to be able to see anything on the map
type:"osm" //add a layer of the type osm (OpenStreetMap)
@@ -248,9 +247,16 @@ if ($color=="dark") $color_path = "/diabook-dark/";
});
function open_mapcontrol() {
- $("div#mapcontrol").attr("style","display: block;width:900px;height:600px;");
- $("#map2").mapQuery({layers:[{type:"osm"}],
- center:({zoom:'.$ELZoom.',position:['.$ELPosX.','.$ELPosY.']})});
+ $("div#mapcontrol").attr("style","display: block;width:900px;height:900px;");
+ $("#map2").mapQuery({
+ layers:[{type:"osm", label:"OpenStreetMap" },
+ {type:"wms", label:"Population density 2010", legend:{url:"http://mapserver.edugis.nl/cgi-bin/mapserv?map=maps/edugis/cache/population.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=Bevolkingsdichtheid_2010&format=image/png"}, url:"http://t1.edugis.nl/tiles/tilecache.py?map=maps/edugis/cache/population.map",
+ layers:"Bevolkingsdichtheid_2010" },
+ {type:"wms",
+ label:"OpenLayers WMS",
+ url:"http://labs.metacarta.com/wms/vmap0",
+ layers:"basic" }],
+ center:({zoom:'.$ELZoom.',position:['.$ELPosX.','.$ELPosY.']})});
$("#mouseposition").mqMousePosition({
map: "#map2",
@@ -259,13 +265,18 @@ if ($color=="dark") $color_path = "/diabook-dark/";
precision:4
});
-
+ $("#layermanager").mqLayerManager({map:"#map2"});
+ $( "div#layermanager" ).accordion({header: ".mq-layermanager-element-header"});
+ $(".mq-layermanager-element-content").attr("style", "");
+
map = $("#map2").mapQuery().data("mapQuery");
textarea = document.getElementById("id_diabook_ELZoom");
-
+ textarea.value = "'.$ELZoom.'";
$("#map2").bind("mousewheel", function(event, delta) {
- if (delta > 0 || delta < 0){
- textarea.value = map.center().zoom; }
+ if (delta > 0 && textarea.value < 18){
+ textarea.value = textarea.value - delta*-1; }
+ if (delta < 0 && textarea.value > "0"){
+ textarea.value = textarea.value - delta*-1; }
});
};
</script>';
@@ -293,20 +304,19 @@ if ($color=="dark") $color_path = "/diabook-dark/";
};
</script>';}
- //check if community_home-plugin is activated and change css
+ //check if community_home-plugin is activated and change css.. we need this, that the submit-wrapper doesn't overlay the login-panel if communityhome-plugin is active
$nametocheck = "communityhome";
$r = q("select id from addon where name = '%s' and installed = 1", dbesc($nametocheck));
- if(count($r) == "1") {
+ if(count($r) == "1" && $a->argv[0] === "home" ) {
$a->page['htmlhead'] .= '
<script>
- $(document).ready(function() {
+ $(function() {
$("div#login-submit-wrapper").attr("style","padding-top: 120px;");
-
});
</script>';
}
- //comment-edit-wrapper on photo_view
+ //comment-edit-wrapper on photo_view... we need this to workaround a global bug in photoview, where the comment-box is between the last comment the the comment before the last
if ($a->argv[0].$a->argv[2] === "photos"."image"){
$a->page['htmlhead'] .= '
<script>
@@ -315,7 +325,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
});
</script>';
}
- //restore right hand col at settingspage
+ //restore (only) the order right hand col at settingspage
if($a->argv[0] === "settings" && local_user()) {
$a->page['htmlhead'] .= '
<script>
@@ -389,11 +399,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
};}
);
-
- function open_boxsettings() {
- $("div#boxsettings").attr("style","display: block;height:500px;width:450px;");
- $("label").attr("style","width: 350px;");
- };
</script>';}
}
@@ -401,7 +406,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
// custom css
if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
-
+
//footer
$tpl = get_markup_template('footer.tpl');
$a->page['footer'] .= replace_macros($tpl, array());
@@ -413,6 +418,68 @@ if ($color=="dark") $color_path = "/diabook-dark/";
function diabook_community_info() {
$a = get_app();
+
+ $close_pages = false;
+ $site_close_pages = get_config("diabook", "close_pages" );
+ if (local_user()) {$close_pages = get_pconfig(local_user(), "diabook", "close_pages");}
+ if ($close_pages===false) $close_pages=$site_close_pages;
+ if ($close_pages===false) $close_pages="1";
+
+ $close_profiles = false;
+ $site_close_profiles = get_config("diabook", "close_profiles" );
+ if (local_user()) {$close_profiles = get_pconfig(local_user(), "diabook", "close_profiles");}
+ if ($close_profiles===false) $close_profiles=$site_close_profiles;
+ if ($close_profiles===false) $close_profiles="0";
+
+ $close_helpers = false;
+ $site_close_helpers = get_config("diabook", "close_helpers" );
+ if (local_user()) {$close_helpers = get_pconfig(local_user(), "diabook", "close_helpers");}
+ if ($close_helpers===false) $close_helpers=$site_close_helpers;
+ if ($close_helpers===false) $close_helpers="0";
+
+ $close_services = false;
+ $site_close_services = get_config("diabook", "close_services" );
+ if (local_user()) {$close_services = get_pconfig(local_user(), "diabook", "close_services");}
+ if ($close_services===false) $close_services=$site_close_services;
+ if ($close_services===false) $close_services="0";
+
+ $close_friends = false;
+ $site_close_friends = get_config("diabook", "close_friends" );
+ if (local_user()) {$close_friends = get_pconfig(local_user(), "diabook", "close_friends");}
+ if ($close_friends===false) $close_friends=$site_close_friends;
+ if ($close_friends===false) $close_friends="0";
+
+ $close_lastusers = false;
+ $site_close_lastusers = get_config("diabook", "close_lastusers" );
+ if (local_user()) {$close_lastusers = get_pconfig(local_user(), "diabook", "close_lastusers");}
+ if ($close_lastusers===false) $close_lastusers=$site_close_lastusers;
+ if ($close_lastusers===false) $close_lastusers="0";
+
+ $close_lastphotos = false;
+ $site_close_lastphotos = get_config("diabook", "close_lastphotos" );
+ if (local_user()) {$close_lastphotos = get_pconfig(local_user(), "diabook", "close_lastphotos");}
+ if ($close_lastphotos===false) $close_lastphotos=$site_close_lastphotos;
+ if ($close_lastphotos===false) $close_lastphotos="0";
+
+ $close_lastlikes = false;
+ $site_close_lastlikes = get_config("diabook", "close_lastlikes" );
+ if (local_user()) {$close_lastlikes = get_pconfig(local_user(), "diabook", "close_lastlikes");}
+ if ($close_lastlikes===false) $close_lastlikes=$site_close_lastlikes;
+ if ($close_lastlikes===false) $close_lastlikes="0";
+
+ $close_twitter = false;
+ $site_close_twitter = get_config("diabook", "close_twitter" );
+ if (local_user()) {$close_twitter = get_pconfig(local_user(), "diabook", "close_twitter");}
+ if ($close_twitter===false) $close_twitter=$site_close_twitter;
+ if ($close_twitter===false) $close_twitter="1";
+
+ $close_mapquery = false;
+ $site_close_mapquery = get_config("diabook", "close_mapquery" );
+ if (local_user()) {$close_mapquery = get_pconfig(local_user(), "diabook", "close_mapquery");}
+ if ($close_mapquery===false) $close_mapquery=$site_close_mapquery;
+ if ($close_mapquery===false) $close_mapquery="1";
+
+
// comunity_profiles
if($close_profiles != "1") {
$aside['$comunity_profiles_title'] = t('Community Profiles');
@@ -509,7 +576,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
}}
// last 12 photos
- if($close_photos != "1") {
+ if($close_lastphotos != "1") {
$aside['$photos_title'] = t('Last photos');
$aside['$photos_items'] = array();
$r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM
@@ -568,7 +635,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
if($close_pages != "1") {
if(local_user()) {
$page = '
- <h3 style="margin-top:0px;">'.t("Community Pages").'<a id="closeicon" href="#boxsettings" onClick="open_boxsettings(); return false;" style="text-decoration:none;" class="icon close_box" title="close"></a></h3>
+ <h3 style="margin-top:0px;">'.t("Community Pages").'<a id="closeicon" href="#boxsettings" onClick="open_boxsettings(); return false;" style="text-decoration:none;" class="icon close_box" title="'.t("Settings").'"></a></h3>
<div id=""><ul style="margin-left: 7px;margin-top: 0px;padding-left: 0px;padding-top: 0px;">';
$pagelist = array();
@@ -608,9 +675,9 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' );
$ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' );
$ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' );
- $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom);
- $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX);
- $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY);
+ $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layers'), $ELZoom, '', $ELZoom);
+ $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX);
+ $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY);
if (isset($_POST['diabook-settings-map-sub']) && $_POST['diabook-settings-map-sub']!=''){
set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']);
set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']);
@@ -660,26 +727,28 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' );
$close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' );
$close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' );
- $close_pagesC = array('1'=>'hide', '0'=>'show',);
- $close_mapqueryC = array('1'=>'hide', '0'=>'show',);
- $close_profilesC = array('0'=>'show', '1'=>'hide',);
- $close_helpersC = array('0'=>'show', '1'=>'hide',);
- $close_servicesC = array('0'=>'show', '1'=>'hide',);
- $close_friendsC = array('0'=>'show', '1'=>'hide',);
- $close_twitterC = array('1'=>'hide', '0'=>'show',);
- $close_lastusersC = array('0'=>'show', '1'=>'hide',);
- $close_lastphotosC = array('0'=>'show','1'=>'hide',);
- $close_lastlikesC = array('0'=>'show', '1'=>'hide',);
- $aside['$close_pages'] = array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC);
- $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC);
- $aside['$close_profiles'] = array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC);
- $aside['$close_helpers'] = array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC);
- $aside['$close_services'] = array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC);
- $aside['$close_friends'] = array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC);
- $aside['$close_twitter'] = array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC);
- $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC);
- $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC);
- $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC);
+ $close_pagesC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_mapqueryC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_profilesC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_helpersC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_servicesC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_friendsC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_twitterC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_lastusersC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_lastphotosC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $close_lastlikesC = array('1'=>t("don't show"), '0'=>t("show"),);
+ $boxsettings['title'] = Array("", t('Show/hide boxes at right-hand column:'), "", "");
+ $aside['$boxsettings'] = $boxsettings;
+ $aside['$close_pages'] = array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC);
+ $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC);
+ $aside['$close_profiles'] = array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC);
+ $aside['$close_helpers'] = array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC);
+ $aside['$close_services'] = array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC);
+ $aside['$close_friends'] = array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC);
+ $aside['$close_twitter'] = array('diabook_close_twitter', t('Last Tweets'), $close_twitter, '', $close_twitterC);
+ $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC);
+ $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC);
+ $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC);
$aside['$sub'] = t('Submit');
$baseurl = $a->get_baseurl($ssl_state);
$aside['$baseurl'] = $baseurl;
@@ -694,7 +763,6 @@ if ($color=="dark") $color_path = "/diabook-dark/";
set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
- header("Location: network");
}
}
$close = t('Settings');
diff --git a/view/theme/diabook/theme_settings.tpl b/view/theme/diabook/theme_settings.tpl
index 68b22a168..ad024dfe9 100644
--- a/view/theme/diabook/theme_settings.tpl
+++ b/view/theme/diabook/theme_settings.tpl
@@ -6,18 +6,11 @@
{{inc field_select.tpl with $field=$resolution}}{{endinc}}
-{{inc field_input.tpl with $field=$TSearchTerm}}{{endinc}}
-
-{{inc field_input.tpl with $field=$ELPosX}}{{endinc}}
-
-{{inc field_input.tpl with $field=$ELPosY}}{{endinc}}
-
-{{inc field_input.tpl with $field=$ELZoom}}{{endinc}}
-
<div class="settings-submit-wrapper">
<input type="submit" value="$submit" class="settings-submit" name="diabook-settings-submit" />
</div>
-
+<br>
+<h3>Show/hide boxes at right-hand column</h3>
{{inc field_select.tpl with $field=$close_pages}}{{endinc}}
{{inc field_select.tpl with $field=$close_profiles}}{{endinc}}
{{inc field_select.tpl with $field=$close_helpers}}{{endinc}}
@@ -27,13 +20,22 @@
{{inc field_select.tpl with $field=$close_lastphotos}}{{endinc}}
{{inc field_select.tpl with $field=$close_lastlikes}}{{endinc}}
{{inc field_select.tpl with $field=$close_twitter}}{{endinc}}
+{{inc field_input.tpl with $field=$TSearchTerm}}{{endinc}}
{{inc field_select.tpl with $field=$close_mapquery}}{{endinc}}
+{{inc field_input.tpl with $field=$ELPosX}}{{endinc}}
+
+{{inc field_input.tpl with $field=$ELPosY}}{{endinc}}
+
+{{inc field_input.tpl with $field=$ELZoom}}{{endinc}}
+
<div class="settings-submit-wrapper">
<input type="submit" value="$submit" class="settings-submit" name="diabook-settings-submit" />
</div>
+<br>
+
<div class="field select">
-<a onClick="restore_boxes()" title="Restore order at right-hand column" style="cursor: pointer;">Restore order at right-hand column</a>
+<a onClick="restore_boxes()" title="Restore boxorder at right-hand column" style="cursor: pointer;">Restore boxorder at right-hand column</a>
</div>