Merge pull request #1550 from ostcar/remove_old_static

Removed old static files
This commit is contained in:
Norman Jäckel 2015-06-18 19:01:05 +02:00
commit 4506d787ee
74 changed files with 0 additions and 51207 deletions

View File

@ -1,128 +0,0 @@
/*
* Styles for web interface of agenda app
*
*/
/* Agenda overview page */
tr.topline td {
border-bottom: 1px solid #333333;
background-color: #CDCDCD;
}
table#agendatime {
width: auto;
margin-bottom: 1em;
font-size: 12px;
}
table#agendatime td {
padding: 3px;
white-space: nowrap;
}
/*** List of speakers ***/
/* List of speakers agenda item view */
div#complete_list_of_speakers li {
list-style-type: none;
}
div#complete_list_of_speakers li {
line-height: 30px;
}
#coming_speakers span.ui-icon {
position: absolute;
margin-left: -15px;
margin-top: 6px;
}
/*** Style for agenda sorting ***/
ol {
margin: 0;
padding: 0;
padding-left: 30px;
}
ol.agenda_list, ol.agenda_list ol {
margin: 0 0 0 25px;
padding: 0;
list-style-type: none;
}
ol.agenda_list {
margin: 0;
}
.agenda_list li {
margin: 5px 0 0 0;
padding: 0;
}
.agenda_list li > div {
border: 1px solid #d4d4d4;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
border-color: #D4D4D4 #D4D4D4 #BCBCBC;
padding: 6px;
margin: 0;
background: #f6f6f6;
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed));
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 );
overflow: auto;
}
.agenda_list li > div.activeline {
background: #bed4de !important;
}
.agenda_list.sortable li > div {
cursor: move;
}
.disclose {
cursor: pointer;
width: 10px;
display: none;
}
.placeholder {
outline: 1px dashed #4183C4;
}
.agenda_list .openclose { width: 40px; float: left; min-height: 1px; }
.agenda_list .duration { width: 92px; float: right; min-height: 1px; text-align: right; padding-right: 15px; }
.agenda_list .manage { width: 200px; float: right; min-height: 1px; padding-left: 15px; }
.agenda_list .title { float: left; padding-left: 5px;}
.agenda_list .optional { float: left; }
.agenda_list .opener_closer { float: left; margin-right: 8px; margin-left:-4px;}
.agenda_list .opener_closer .btn { padding: 0 2px; }
.agenda_list .optional { float: right; width: 208px; padding-left: 8px;}
#menu-overview .manage { width: 200px; }
#menu-overview .duration { width: 65px; text-align: right; padding-right: 19px;}
#menu-overview .optional { width: 200px; }
@media screen and (max-width: 1000px) {
#menu-overview .optional { width: 150px; }
.agenda_list .optional { float: right; width: 158px; padding-left: 8px;}
}
@media screen and (max-width: 800px) {
#menu-overview .optional { width: 100px; }
.agenda_list .optional { float: right; width: 108px; padding-left: 8px;}
}
.agenda_list .opener, .agenda_list .closer { }
.agenda_list .opener { display: none; }
.agenda_list li.closed ol { display: none; }
.agenda_list li.closed .closer { display: none; }
.agenda_list li.closed > div .opener { display: inline-block; }
@media (max-width: 480px) {
#menu-overview .manage, .agenda_list .manage {
width: 50px;
}
.agenda_list .manage {
padding-right: 14px;
}
#menu-overview .duration, .agenda_list .duration {
width: 60px;
}
.agenda_list .duration {
padding-right: 11px;
}
}

View File

@ -1,61 +0,0 @@
/*
* Styles for projector slides of agenda app
*
*/
/*** List of speakers projector slide ***/
ul#list_of_speakers {
list-style-type: none;
padding: 0;}
#list_of_speakers li {
font-size: 130%;
line-height: 150%;}
#list_of_speakers .old_speaker {
color: #9FA9B7;}
#list_of_speakers .actual_speaker {
font-weight: bold;
margin-bottom: 0.5em;}
/*** List of speakers overlay ***/
#overlay_list_of_speaker_box {
position: fixed;
bottom: 0;
right: 0;
border-radius: 0.4em;
border: 0.1em solid #777777;
background-color: #cccccc;
opacity: 0.9;
padding: 1em;
margin: 1em;
z-index: 2;
width: 45%;
min-width: 200px;}
#overlay_list_of_speaker_box h3 {
margin: 5px;}
#overlay_list_of_speaker_box ul {
list-style-type: none;
margin: 5px;}
#overlay_list_of_speaker_box li {
font-size: 120%;
line-height: 120%;}
#overlay_list_of_speaker_box .old_speaker {
color: #777777;}
#overlay_list_of_speaker_box .actual_speaker {
font-weight: bold;
margin-bottom: 0em;}
/*** Agenda Items ***/
.itemlist {
margin-top: 20px;
}
.itemlist li {
font-size:130%;
padding-bottom: 20px;
list-style-type: none;
}
.itemlist .closed {
color: #9FA9B7;
list-style-type: none;
}

View File

@ -1,39 +0,0 @@
/*
* Styles for web interface of assignment app
*
*/
/* Navigation icons (mapping to glyphicons-halflings) */
.icon-charts {
background-image: url("../img/glyphicons_041_charts.png");
background-position: 0px center;
}
.leftmenu ul li.active a span.ico i.icon-charts {
background-image: url("../img/glyphicons_041_charts_white.png");
}
/* Election result table */
#election-result-table td.elected {
background-color: #BED4DE !important;
}
#election-result-table td.elected a.election_link {
background-image: url(../img/voting-yes.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: block;
margin-right: 5px;
float: left;
}
#election-result-table td a.election_link {
background-image: url(../img/voting-yes-grey.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: block;
margin-right: 5px;
float: left;
}

View File

@ -1,27 +0,0 @@
CKEditor Insert <pre> Plugin
===============================
This plugin makes it easier to insert a <pre> tag in CKEditor.
Installation
------------
1. Clone/copy this repository contents in a new "plugins/insertpre" folder in your CKEditor installation.
2. Enable the "insertpre" plugin in the CKEditor configuration file (config.js):
config.extraPlugins = 'insertpre';
That's all. "InsertPre" button will appear on the editor toolbar and will be ready to use.
3. Optionally, you may specify which class should be added to the <pre> element:
CKEDITOR.config.insertpre_class = 'prettyprint';
As well as specify how the <pre> tag should be rendered inside CKEditor:
CKEDITOR.config.insertpre_style = 'background-color:#F8F8F8;border:1px solid #DDD;padding:10px;';
License
-------
Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

View File

@ -1,6 +0,0 @@
CKEDITOR.plugins.setLang( 'insertpre', 'en', {
title : 'Insert code snippet',
code : 'Code',
edit : 'Edit code',
notEmpty : 'The code field cannot be empty.'
});

View File

@ -1,6 +0,0 @@
CKEDITOR.plugins.setLang( 'insertpre', 'pl', {
title : 'Wstaw kod',
code : 'Kod',
edit : 'Edytuj',
notEmpty: 'Pole z kodem nie może być puste.'
});

View File

@ -1,131 +0,0 @@
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'insertpre',
{
requires: 'dialog',
lang : 'en,pl', // %REMOVE_LINE_CORE%
icons: 'insertpre', // %REMOVE_LINE_CORE%
onLoad : function()
{
if ( CKEDITOR.config.insertpre_class )
{
CKEDITOR.addCss(
'pre.' + CKEDITOR.config.insertpre_class + ' {' +
CKEDITOR.config.insertpre_style +
'}'
);
}
},
init : function( editor )
{
// allowed and required content is the same for this plugin
var required = CKEDITOR.config.insertpre_class ? ( 'pre( ' + CKEDITOR.config.insertpre_class + ' )' ) : 'pre';
editor.addCommand( 'insertpre', new CKEDITOR.dialogCommand( 'insertpre', {
allowedContent : required,
requiredContent : required
} ) );
editor.ui.addButton && editor.ui.addButton( 'InsertPre',
{
label : editor.lang.insertpre.title,
icon : this.path + 'icons/insertpre.png',
command : 'insertpre',
toolbar: 'insert,99'
} );
if ( editor.contextMenu )
{
editor.addMenuGroup( 'code' );
editor.addMenuItem( 'insertpre',
{
label : editor.lang.insertpre.edit,
icon : this.path + 'icons/insertpre.png',
command : 'insertpre',
group : 'code'
});
editor.contextMenu.addListener( function( element )
{
if ( element )
element = element.getAscendant( 'pre', true );
if ( element && !element.isReadOnly() && element.hasClass( editor.config.insertpre_class ) )
return { insertpre : CKEDITOR.TRISTATE_OFF };
return null;
});
}
CKEDITOR.dialog.add( 'insertpre', function( editor )
{
return {
title : editor.lang.insertpre.title,
minWidth : 540,
minHeight : 380,
contents : [
{
id : 'general',
label : editor.lang.insertpre.code,
elements : [
{
type : 'textarea',
id : 'contents',
label : editor.lang.insertpre.code,
cols: 140,
rows: 22,
validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.insertpre.notEmpty ),
required : true,
setup : function( element )
{
var html = element.getHtml();
if ( html )
{
var div = document.createElement( 'div' );
div.innerHTML = html;
this.setValue( div.firstChild.nodeValue );
}
},
commit : function( element )
{
element.setHtml( CKEDITOR.tools.htmlEncode( this.getValue() ) );
}
}
]
}
],
onShow : function()
{
var sel = editor.getSelection(),
element = sel.getStartElement();
if ( element )
element = element.getAscendant( 'pre', true );
if ( !element || element.getName() != 'pre' || !element.hasClass( editor.config.insertpre_class ) )
{
element = editor.document.createElement( 'pre' );
this.insertMode = true;
}
else
this.insertMode = false;
this.pre = element;
this.setupContent( this.pre );
},
onOk : function()
{
if ( editor.config.insertpre_class )
this.pre.setAttribute( 'class', editor.config.insertpre_class );
if ( this.insertMode )
editor.insertElement( this.pre );
this.commitContent( this.pre );
}
};
} );
}
} );
if (typeof(CKEDITOR.config.insertpre_style) == 'undefined')
CKEDITOR.config.insertpre_style = 'background-color:#F8F8F8;border:1px solid #DDD;padding:10px;';
if (typeof(CKEDITOR.config.insertpre_class) == 'undefined')
CKEDITOR.config.insertpre_class = 'prettyprint';

View File

@ -1,376 +0,0 @@
/*
* OpenSlides default template styles of the web interface
*/
body {
background-color: #FBFBFB;
}
/* Header */
#header {
background-color: #333333;
background-image: -moz-linear-gradient(top, #444444, #222222);
background-image: -ms-linear-gradient(top, #444444, #222222);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
background-image: -webkit-linear-gradient(top, #444444, #222222);
background-image: -o-linear-gradient(top, #444444, #222222);
background-image: linear-gradient(top, #444444, #222222);
box-shadow: 0 0 7px rgba(0,0,0,0.6);
border-radius: 0;
height: 35px;
margin-bottom: 20px;
padding: 7px 20px 0;
position: relative;
}
#header .logo img {
height: 30px;
padding-left: 3px;
}
#header .title {
font-size: 16px;
color: #999999;
position: absolute;
margin: 8px 0 0 50px;
}
#searchform {
margin-top: 0px;
}
footer {
margin-bottom: 20px;
}
/* Headings and Links */
h1 {
border-bottom: 1px solid #EEEEEE;
margin: 0px 0 30px;
padding-bottom: 9px;
}
a:hover {
text-decoration: none;
}
/* Login page */
#login-page.container {
width: 320px;
margin-top: 20px;
}
#login-page h2 {
margin-left: 30px;
margin-bottom: 20px;
}
#login-page h2 img {
width: 250px;
}
#login-page .well {
background-color: white;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px 6px 6px 6px;
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
margin-top: 20px;
padding-bottom: 20px;
line-height: 45px;
}
/* Log */
#log {
padding-left: 14px;
}
/** Utils **/
tr.offline td, li.offline {
background-color: #EAEAEA !important;
}
tr.activeline td, li.activeline {
background-color: #bed4de !important;
}
.nopadding {
padding: 0;
}
.alert form {
margin-bottom: 0;
}
tr.total td {
border-top: 1px solid #333333;
}
.nobr {
white-space: nowrap;
}
.right {
float: right;
}
.indentation {
margin-left: 12px;
}
.mini_width {
width: 1px;
}
/* show optional column */
.optional {
display: auto;
}
.user_details fieldset {
margin-bottom: 10px;
}
.user_details legend {
margin-bottom: 5px;
}
.user_details label {
font-weight: bold;
margin: 10px 0 0 0;
}
.user_details label:after {
content: ":";
}
/** Colors **/
.grey {
color: grey;
}
/** Forms **/
input, textarea {
width: 320px;
}
.small-form input {
width: 55px;
}
.normal-form input {
width: 320px;
}
textarea {
height: 100px;
}
.help-inline {
font-size: 11px;
}
.errorlist{
margin: 0;
}
.errorlist li {
list-style: none outside none;
}
form .required label:after {
content: " *";
}
legend + .control-group {
margin-top: 0px !important;
}
#id_permissions {
height: 310px;
width: auto;
}
#id_users {
height: 110px;
width: auto;
}
#dataTable_filter input {
width: auto;
}
#dataTable {
clear: none;
}
#dataTable_wrapper .row-fluid:after {
clear: none;
}
.searchresults li {
margin-bottom: 15px;
}
.searchresults li .app {
color: #999999;
}
.highlighted {
font-weight: bold;
}
/* ckeditor plugin insertpre: textarea style */
table.cke_dialog_contents textarea {
font-family: monospace !important;
}
/** Left sidebar navigation **/
.leftmenu ul {
margin: 0;
padding: 0;
list-style: none;
}
.leftmenu ul ul {
display: none;
margin-left: 35px;
margin-top: -1px;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.leftmenu ul li {
display: block;
width: 100%;
line-height: 30px;
}
.leftmenu ul li a {
border-style: none solid solid;
border-width: 0 1px 1px;
border-color: #dddddd;
color: #666666;
display: block;
font-weight: bold;
background-color: #ffffff;
padding: 0;
}
.leftmenu ul li:first-child a {
border-top: 1px solid #DDDDDD;
}
.leftmenu ul li a .glyphicon {
display: inline-block;
background: #f9f9f9;
padding: 8px 10px 6px;
margin: 0 5px 0 0;
border-right: 1px solid #dddddd;
}
.leftmenu ul li a, .leftmenu ul li a .glyphicon {
-webkit-transition: background 0.2s ease-in-out;
-moz-transition: background 0.2s ease-in-out;
-ms-transition: background 0.2s ease-in-out;
-o-transition: background 0.2s ease-in-out;
transition: background 0.2s ease-in-out;
}
.leftmenu ul li a:hover {
background-color: #f5f5f5;
color: #000000;
}
.leftmenu ul li a:hover .glyphicon {
background-color: #efefef;
}
.leftmenu ul li.active a {
background-color: #333333;
color: #ffffff;
}
.leftmenu ul li.active a .glyphicon {
background-color: #333333;
border-right: 1px solid #444444;
}
.leftmenu ul li.hider a {
margin-top: 5px;
height: 20px;
}
.leftmenu.lefticon > ul {
width: 37px !important;
}
.leftmenu.lefticon ul ul {
position: absolute;
z-index: 20;
margin-top: -34px;
}
.leftmenu.lefticon > ul > li > a > span.text {
display: none;
}
.leftmenu.lefticon ul ul > li > a {
min-width: 200px !important;
}
.leftmenu.lefticon span.text {
padding-right: 15px;
}
/** Icons **/
/* TODO: Move some of them to the respective apps. */
.icon-assignment {
background: url("../img/glyphicons_041_charts.png") no-repeat !important;
width: 25px;
margin-left: 10px !important;
}
.leftmenu ul li.active a .glyphicon.icon-assignment {
background-image: url("../img/glyphicons_041_charts_white.png") !important;
}
.status_link .icon-on, .icon-checked-new {
background-image: url("../img/glyphicons_152_check.png");
background-position: 0;
}
.icon-checked-new_white {
background-image: url("../img/glyphicons_152_check_white.png");
background-position: 0;
}
.status_link .icon-off, .icon-unchecked-new {
background-image: url("../img/glyphicons_153_unchecked.png");
background-position: 0;
}
.icon-summary {
background-image: url("../img/glyphicons_154_more_windows.png");
background-position: 0;
}
.icon-summary.icon-white {
background-image: url("../img/glyphicons_154_more_windows_white.png");
background-position: 0;
}
.icon-login {
background-image: url("../img/glyphicons_044_keys.png");
background-position: 0;
}
.icon-group {
background-image: url("../img/glyphicons_043_group.png");
background-position: 0;
}
.icon-import {
background-image: url("../img/glyphicons_358_file_import.png");
background-position: 0;
}
.icon-delete {
background-image: url("../img/glyphicons_256_delete.png");
background-position: 0;
}
.icon-add-user {
background-image: url("../img/glyphicons_006_user_add.png");
background-position: 0;
}
.icon-clock {
background-image: url("../img/glyphicons_054_clock.png");
background-position: 0;
}
.icon-speaker {
background-image: url("../img/glyphicons_300_microphone.png");
background-position: 0;
}
/** Responsive **/
@media (max-width: 767px) {
body {
padding: 0;
}
.row-fluid .leftmenu {
float: left;
width: auto;
}
#content {
margin: 0 5px 0 45px;
width: auto;
}
/* hide optional column */
.optional, #searchform #id_q {
display: none;
}
#searchform button {
border-radius: 4px;
}
}
@media (max-width: 480px) {
body {
padding: 0;
}
.row-fluid .leftmenu {
float: left;
width: auto;
}
#header {
padding: 7px 5px 0;
}
#content {
margin: 0 5px 0 45px;
width: auto;
}
/* hide optional column */
.optional, .optional-small{
display: none;
}
#menu-overview .manage, .agenda_list .manage {
width: 50px !important;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,64 +0,0 @@
/** Chatbox **/
.icon-comments {
background-position: -240px -120px;
}
div#chatbox {
width: 40%;
height: 220px;
min-height: 140px;
min-width: 300px;
position: fixed;
right: 0px;
bottom: 0;
z-index: 99;
margin-bottom: 0;
box-shadow: -3px -3px 10px rgba(0,0,0,0.2);
border-width: 2px;
border-color: darkgrey;
padding: 0;
}
#chatbox-header{
background-color: #333333;
background-image: -moz-linear-gradient(top, #444444, #222222);
background-image: -ms-linear-gradient(top, #444444, #222222);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
background-image: -webkit-linear-gradient(top, #444444, #222222);
background-image: -o-linear-gradient(top, #444444, #222222);
background-image: linear-gradient(top, #444444, #222222);
border-color: #333333;
}
h1#chatbox-title {
color: #999999;
font-size: 16px;
font-weight: bold;
line-height: 16px;
margin: 0;
padding: 3px 10px 7px 10px;
border-bottom: none;
}
div#chatbox div#chatbox-text {
clear: both;
overflow-y:scroll;
background-color: white;
padding: 0 10px;
font-size: 12px;
height: calc(100% - 65px);
}
#chatbox form {
margin-bottom: 0px;
padding: 5px;
}
#chatbox form input {
width: 90%;
}
#newchatmessage {
border-radius: 8px;
background-color: red;
color: white;
font-size: 0.7em;
position: relative;
right: 0;
top: -6px;
padding: 2px 6px;
display: none;
}

View File

@ -1,173 +0,0 @@
/*
* OpenSlides dashboard styles
*
*/
/*** Widgets ***/
.column {
width: 50%;
float: left;
padding-bottom: 100px;
}
.widget {
margin: 0 10px 10px 0;
}
.widget.affix {
position: fixed;
z-index: 100;
right: 20px;
top: 42px;
max-width: 40%;
}
.widget-header {
min-height: 30px;
background: #E9E9E9;
background:-moz-linear-gradient(top, #FAFAFA 0%, #E9E9E9 100%); /* FF3.6+ */
background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#E9E9E9)); /* Chrome,Safari4+ */
background:-webkit-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); /* Chrome10+,Safari5.1+ */
background:-o-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); /* Opera11.10+ */
background:-ms-linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); /* IE10+ */
background:linear-gradient(top, #FAFAFA 0%,#E9E9E9 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9');
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FAFAFA', endColorstr='#E9E9E9')";
border: 1px solid #D5D5D5;
border-radius: 5px 5px 0 0;
}
.widget-header:hover {
cursor: pointer;
}
.widget-header button:hover {
cursor: default;
}
.widget-header h3 {
margin: 7px 0 7px 14px;
font-size: 14px;
color: #555;
line-height: 18px;
}
.widget-header [class^="icon-"], .widget-header [class*=" icon-"] {
margin: -2px 5px 0 0px;
color: #555;
vertical-align: middle;
}
.widget-header .collapsebutton, .widget-header .fixbutton{
margin: -2px 4px 0 0px;
}
.widget-header .fixbutton{
margin-left: 6px;
}
.widget-header .icon-pushpin {
background-image: url("../img/glyphicons_335_pushpin.png");
background-position: 0 center;
}
.widget-content {
padding: 0px 15px 0px 13px;
background: #FFF;
border: 1px solid #D5D5D5;
border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
}
.widget-content-inner {
margin-top: 10px;
}
.widget-content li {
padding: 4px 0;
}
.widget-content .overlay_list li {
padding-bottom: 10px;
}
.widget-content ul {
list-style: none inside none;
margin: 0;
}
.widget-content hr {
margin: 5px 0;
}
.ui-sortable-placeholder {
border: 2px dashed #555555;
visibility: visible !important;
height: 50px !important;
}
.ui-sortable-placeholder * {
visibility: hidden;
}
.overlay_list .overlayblock {
margin: 0 0 0 31px;
}
#countdown_time {
width: 40px;
}
/*** iframe for live view ***/
#iframe {
width: 1024px;
height: 768px;
-moz-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
-o-transform-origin: 0 0;
transform-origin: 0 0 0;
-moz-transform: scale(0.25);
-webkit-transform: scale(0.25);
-o-transform: scale(0.25);
transform: scale(0.25);
/* IE8+ - must be on one line, unfortunately */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.25, M12=0, M21=0, M22=0.25, SizingMethod='auto expand')";
}
#iframewrapper {
width: 256px;
height: 192px;
position: relative;
overflow: hidden;
border: 1px solid #D5D5D5;
margin-bottom: 10px;
}
#iframeoverlay {
width: 256px;
height: 192px;
position: absolute;
top: 0px;
left: 0px;
display: block;
z-index: 1;
}
/* Projector control panel */
.notNull {
color: red;
font-weight: bold;
}
/*** misc ***/
.custom-btn-mini {
width: 20px;
}
.custom-btn-mini i {
-moz-margin-start: 4px !important;
margin-left: -6px;
}
/*
* style for countdown shortcuts
*
* TODO: move to projector app or merge projector with core
*/
#countdown_shortcut_storage {
margin-top: 5px;
}
#countdown_shortcut_storage .countdown_shortcut_time {
margin-right: 2px;
}
#countdown_shortcut_storage .countdown_shortcut_time span {
padding-right: 5px;
}
#countdown_shortcut_dummy {
display: none;
}

View File

@ -1,44 +0,0 @@
/*
* jQuery UI timepicker styles
*
*/
.ui-timepicker-div .ui-widget-header {
margin-bottom: 8px;
}
.ui-timepicker-div dl {
text-align: left;
}
.ui-timepicker-div dl dt {
height: 25px;
margin-bottom: -25px;
}
.ui-timepicker-div dl dd {
margin: 0 10px 10px 65px;
}
.ui-timepicker-div td {
font-size: 90%;
}
.ui-tpicker-grid-label {
background: none;
border: none;
margin: 0;
padding: 0;
}
.ui-timepicker-rtl{
direction: rtl;
}
.ui-timepicker-rtl dl {
text-align: right;
}
.ui-timepicker-rtl dl dd {
margin: 0 65px 10px 10px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,123 +0,0 @@
/*
* jQuery bsmSelect styles
*
*/
.bsmContainer {
/* container that surrounds entire bsmSelect widget */
}
.bsmSelect {
/* the newly created regular 'select' */
display: inline;
}
.bsmOptionDisabled {
/* disabled options in new select */
color: #999;
}
.bsmHighlight {
/* the highlight span */
float: right;
padding: 0;
margin: 0 0 0 1em;
}
.bsmList {
/* html list that contains selected items */
margin: 0.25em 0 1em 0;
position: relative;
display: block;
padding-left: 0;
list-style: none;
}
.bsmListItem {
/* li item from the html list above */
position: relative;
margin-left: 0;
padding-left: 0;
list-style: none;
background: #ddd;
border: 1px solid #bbb;
width: auto;
margin: 0 0 -1px 0;
line-height: 1em;
}
.bsmListItem:hover {
background-color: #e5e5e5;
}
.bsmListItemLabel {
/* this is a span that surrounds the text in the item, except for the remove link */
padding: 5px;
display: block;
}
.bsmListSortable .bsmListItemLabel {
cursor: move;
}
.bsmListItemRemove {
/* the remove link in each list item */
position: absolute;
right: 0;
top: 0;
padding: 5px;
}
.bsmScrollWorkaround {
/* Fix a bug when the 'html' element has an overflow set to either 'scroll' or 'auto' on FF. */
padding-bottom: 1px;
overflow: auto;
}
/*
* Custom styles
*/
.bsmList-custom {
/* html list that contains selected items */
margin: 0;
display: block;
padding-left: 0;
list-style: none;
}
.bsmListItem-custom {
/* li item from the html list above */
margin: 0 5px 5px 0;
padding: 4px;
list-style: none;
background: #ddd;
border: 1px solid #bbb;
line-height: 1em;
float: left;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.bsmListItem-custom:hover {
background-color: #e5e5e5;
box-shadow: 0 0 3px #aaa;
-webkit-box-shadow: 0 0 3px #aaa;
-moz-box-shadow: 0 0 3px #aaa;
}
.bsmListItemLabel-custom {
padding-right: 5px;
}
.bsmListItemRemove-custom {
text-decoration: none;
}
.bsmContainer:after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 979 B

View File

@ -1,111 +0,0 @@
// Functions for OpenSlides chatbox
$(function() {
// Chatbox is resizable on two sides (north and west) and
// one corner (nortwest)
$("div#chatbox").resizable({ handles: 'n, w, nw' });
});
$("#chatboxbutton").click(function(){
if ($(this).hasClass('active')) {
/* close chatbox */
$("#chatbox").addClass('hidden');
// Save new chatbox state in cookie
save_cookie(false);
} else {
/* open chatbox */
$("#chatbox").removeClass('hidden');
// Scroll chat content to end
$("#chatbox-text").scrollTop(10000);
// Set focus to input field
$("#chatbox-form-input").val('').focus();
// Save new chatbox state in cookie
save_cookie(true)
$.cookie('openslides-chatbox-new-message', 0, { path: "/"});
// Hide new message number
$("#newchatmessage").fadeOut();
}
});
$("#close-chatbox").click(function(){
$("#chatbox").addClass('hidden');
$("#chatboxbutton").removeClass('active');
// Save new chatbox state in cookie
save_cookie(false);
});
$("#chatbox").resize(function() {
// If resizing the chatbox window the chatbox text scrolls to latest message.
// Sets a minimum for width and height.
$("#chatbox-text").scrollTop(10000);
$("#chatbox").resizable( "option", "minWidth", 300 );
$("#chatbox").resizable( "option", "minHeight", 140 );
save_cookie(true);
});
// Save chatbox state in cookie.
// Parameter 'active': chatbox window is open (true) or closed (false).
function save_cookie(active) {
var status = {
'active': active,
'width': $("#chatbox").width(),
'height': $("#chatbox").height()
};
$.cookie('openslides-chatbox', JSON.stringify(status), { path: "/"});
}
$(document).ready(function(){
// Load chatbox state from cookie.
var cookie = $.cookie('openslides-chatbox');
if (cookie) {
var status = $.parseJSON(cookie);
if (status['active']) {
$("#chatbox").removeClass('hidden');
$("#chatboxbutton").addClass('active');
// Scroll chat content to end
$("#chatbox-text").scrollTop(10000);
// Set focus to input field
$('#chatbox-form-input').val('').focus();
}
if (status['width']) {
$("#chatbox").width(status['width']);
}
if (status['height']) {
$("#chatbox").height(status['height']);
}
}
// Load number of new messages from cookie
if ($.cookie('openslides-chatbox-new-message') > 0) {
$("#newchatmessage").html($.cookie('openslides-chatbox-new-message'));
$("#newchatmessage").show(0);
}
// Print chat messages into chatbox
function print_message_into_box(message) {
var chatcontent = $('#chatbox-text');
chatcontent.html(chatcontent.html() + '<br>' + message);
chatcontent.scrollTop(chatcontent.scrollTop() + 10000);
// if chatbox is hidden show number of new messages and save in cookie
if ($("#chatbox").hasClass('hidden')){
new_messages = parseInt($.cookie('openslides-chatbox-new-message')) + 1;
if (new_messages == 1)
$("#newchatmessage").fadeIn();
$("#newchatmessage").html(new_messages);
$.cookie('openslides-chatbox-new-message', new_messages, { path: "/"});
}
}
var connection = new SockJS('http://' + window.location.host + '/core/chatbox');
connection.onmessage = function(event) {
print_message_into_box(event.data);
};
$("#chatbox-form").submit(function(){
var message = $('#chatbox-form-input').val();
connection.send(message);
$('#chatbox-form-input').val('').focus();
return false;
});
});

View File

@ -1,111 +0,0 @@
/*
* Functions to alter the tags via ajax-commands.
*/
$(function() {
// The HTML-input field, in which the tag-name can be altered
var insert_element = $('#tag-edit');
// Boolean value to block second insert-ajax-requests before the pk was returned
var insert_is_blocked = false;
// Clears the HTML-input field to add new tags
$('#tag-save').click(function(event) {
event.preventDefault();
insert_element.val('');
// This is the important line, where the name-attribute of the html-element is set to new
insert_element.attr('name', 'new');
insert_is_blocked = false;
});
// The same happens, if the enter key (keycode==13) was pressed inside the input element
insert_element.keypress(function(event) {
if ( event.which == 13 ) {
event.preventDefault();
$('#tag-save').trigger('click');
}
});
// Change the tag which will be updated
$('.tag-edit').click(function(event) {
event.preventDefault();
var edit_element = $(this);
insert_element.val(edit_element.parents('.tag-row').children('.tag-name').html());
// This is the important line, where the name-attribute of the html-elemtnt is set to edit
insert_element.attr('name', 'edit-' + edit_element.parents('.tag-row').attr('id'));
insert_is_blocked = false;
});
// Code when the delete button of a tag is clicked. Send the ajax-request and
// remove the tag-element from the DOM, when the request was a success.
$('.tag-del').click(function(event) {
event.preventDefault();
var delete_element = $(this);
$.ajax({
method: 'POST',
data: {
name: 'delete-' + delete_element.parents('.tag-row').attr('id')},
dataType: 'json',
success: function(data) {
if (data.action == 'deleted') {
delete_element.parents('.tag-row').remove();
}
}
});
});
// Send the changed data, when new input is in the insert element.
// Use the 'input'-event instead of the 'change'-event, so new data is send
// event when the element does not loose the focus.
insert_element.on('input', function(event) {
// Only send data, if insert_is_blocked is false
if (!insert_is_blocked) {
// block the insert when a new tag is send to the server
if (insert_element.attr('name') == 'new') {
insert_is_blocked = true;
}
$.ajax({
// Sends the data to the current page
method: 'POST',
data: {
name: insert_element.attr('name'),
value: insert_element.val()},
dataType: 'json',
success: function(data) {
if (data.action == 'created') {
// If a new tag was created, use the hidden dummy-tag as template
// to create a new tag-line
// Known bug: the element is added at the end of the list and
// not in alphabetic order. This will be fixed with angular
var new_element = $('#dummy-tag').clone(withDataAndEvents=true);
new_element.attr('id', 'tag-' + data.pk);
new_element.children('.tag-name').html(insert_element.val());
new_element.appendTo('#tag-table');
new_element.slideDown();
// Set the insert-element to edit the new created tag and unblock the
// ajax-method
insert_element.attr('name', 'edit-tag-' + data.pk);
insert_is_blocked = false;
} else if (data.action == 'updated') {
// If a existing tag was altered, change it.
$('#tag-' + data.pk).children('.tag-name').html(insert_element.val());
}
if (data.error) {
insert_element.parent().addClass('error');
if (insert_element.attr('name') == 'new') {
// Remove the block, even if an error happend, so we can send a
// new name for the tag
insert_is_blocked = false;
}
} else {
insert_element.parent().removeClass('error');
};
},
});
}
});
});

View File

@ -1,293 +0,0 @@
/*
* JavaScript functions for OpenSlides dashboard.
*
*/
// function that writes the widget list order to a cookie
function saveOrder() {
$(".column").each(function(index, value){
var colid = value.id;
var cookieName = "openslides-dashboard-" + colid;
// Get the order for this column.
var order = $('#' + colid).sortable("toArray");
var cookie_content = [];
for (var i = 0; i < order.length; i++) {
widget_id = order[i];
widget = $('#' + widget_id);
var is_collabsed = 0;
var is_pinned = 0;
if (!widget.find('.collapse').hasClass('in')) {
is_collabsed = 1;
}
if (widget.hasClass('affix')) {
is_pinned = 1;
}
cookie_content[i] = widget_id + '/' + is_collabsed + '/' + is_pinned;
}
$.cookie(cookieName, cookie_content);
});
}
// function that restores the widget list order from a cookie
function restoreOrder() {
$(".column").each(function(index, value) {
var colid = value.id;
var cookieName = "openslides-dashboard-" + colid;
var cookie = $.cookie(cookieName);
if ( cookie === undefined ) { return; }
var widgets = cookie.split(",");
for (var i = 0, n = widgets.length; i < n; i++ ) {
var widget_information = widgets[i].split('/');
var widgetID = widget_information[0];
var widget = $(".column").find('#' + widgetID);
widget.appendTo($('#' + colid));
if (widget_information[1] === "1") {
widget.find('.collapse').removeClass('in');
console.log(widget_information[0]);
widget.find('.collapsebutton').find('.btn').addClass('active');
}
if (widget_information[2] === "1") {
widget.addClass('affix');
widget.data('spy', 'affix');
widget.find('.fixbutton').find('.btn').addClass('active');
}
}
});
$('.collapse')
.on('hidden', function () { saveOrder(); })
.on('shown', function () { saveOrder(); });
}
$(function() {
$( ".column" ).sortable({
connectWith: ".column",
handle: ".widget-header",
stop: function() { saveOrder(); }
});
// control the projector view
$('.projector_edit').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: link.attr('href'),
dataType: 'json',
success: function(data) {
// change scale level number
$('#scale_level').html(data['scale_level']);
if ( data['scale_level'] != 0 )
$('#scale_level').addClass('notNull');
else
$('#scale_level').removeClass('notNull');
// change scroll level number
$('#scroll_level').html(data['scroll_level']);
if ( data['scroll_level'] != 0 ) {
$('#scroll_level').addClass('notNull');
if ( $('#scroll_up_button').hasClass('disabled') )
$('#scroll_up_button').removeClass('disabled');
}
else {
$('#scroll_level').removeClass('notNull');
$('#scroll_up_button').addClass('disabled');
}
}
});
});
// control countdown
// TODO: Move Countdown-code into the projector app, or merge the projector
// app with the core app.
$('.countdown_control').click(function(event) {
event.preventDefault();
var link = $(this);
var requestData = {};
if (link.attr('id') == "countdown_set") {
requestData = { "countdown_time" : $( "#countdown_time" ).val() };
}
$.ajax({
type: 'GET',
url: link.attr('href'),
data: requestData,
dataType: 'json',
success: function(data) {
if (data['state'] == 'active') {
$('#countdown_play').hide();
$('#countdown_stop').show();
} else {
$('#countdown_play').show();
$('#countdown_stop').hide();
}
$('#countdown_time').val(data['countdown_time']);
}
});
});
$('#countdown_set').click(function(event) {
// Create a shortcut from the value in the form
event.preventDefault();
var times = get_times();
times.push($("#countdown_time" ).val());
localStorage.setItem('countdown_shortcut', times.join());
build_countdown_shortcuts();
});
get_times = function() {
// Loads the time values from the local storages. Converts all values
// to integers and removes doubles.
// Returns an empty array if an error occurs
try {
return localStorage.getItem('countdown_shortcut').split(',')
.map(function(value) {
// converts times into int
return parseInt(value);
}).filter(function(value, index, self) {
// filters doubles
return self.indexOf(value) === index;
});
} catch(err) {
return [];
}
};
$('.countdown_shortcut_time').click(function(event) {
// click on a shortcut. Set the form value and simulate a click event.
event.preventDefault();
var time = $(this).children('span').html();
$('#countdown_time').val(time);
$('#countdown_set').click();
});
$('.countdown_shortcut_time .close').click(function(event) {
// Removes a shortcut.
event.preventDefault();
var time = $(this).parent().parent().children('span').html();
var times = get_times().filter(
function(value) {
return value !== parseInt(time);
}
);
localStorage.setItem('countdown_shortcut', times);
build_countdown_shortcuts();
});
build_countdown_shortcuts = function() {
// Recreates the countdown shortcuts
var times = get_times();
$('#countdown_shortcut_storage').empty();
$.each(times, function(index, time) {
var element = $('#countdown_shortcut_dummy').clone(withDataAndEvents=true);
element.attr('id', '');
$('span', element).html(time);
element.appendTo('#countdown_shortcut_storage');
});
};
// build shortcuts at start time.
build_countdown_shortcuts();
// activate/deactivate overlay
$('.overlay_activate_link').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: link.attr('href'),
dataType: 'json',
success: function(data) {
if (data['active']) {
$('#' + data['name'] + '_active').show();
$('#' + data['name'] + '_inactive').hide();
} else {
$('#' + data['name'] + '_active').hide();
$('#' + data['name'] + '_inactive').show();
}
}
});
});
$('#overlay_message').ajaxForm({
dataType: 'json',
success: function(data) {
$('#overlay_message_text').val(data['overlay_message']);
}
});
$('.fixbutton button').click(function (event) {
event.preventDefault();
if($(this).hasClass('active')) {
$(this).closest('.widget').removeClass('affix');
$(this).closest('.widget').removeAttr('data-spy');
saveOrder();
} else {
$(this).closest('.widget').addClass('affix');
$(this).closest('.widget').attr('data-spy', 'affix');
saveOrder();
}
});
// control pdf pages
$('.pdf-page-ctl').click(function(event){
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: link.attr('href'),
dataType: 'json',
success: function(data) {
if (typeof data.current_page !== 'undefined') {
$('#page_num').val(data.current_page);
}
}
});
});
$('.set-page-form').submit(function() {
$(this).ajaxSubmit();
return false;
});
$('.go-first-page').click(function() {
$('#page_num').val('1');
$('.set-page-form').ajaxSubmit();
});
$('.pdf-toggle-fullscreen').click(function(event){
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: link.attr('href'),
dataType: 'json',
success: function(data) {
if(data.fullscreen) {
if (!link.hasClass('btn-primary')) {
link.addClass('btn-primary');
link.find('i').addClass('icon-white');
}
} else {
if (link.hasClass('btn-primary')) {
link.removeClass('btn-primary');
link.find('i').removeClass('icon-white');
}
}
}
});
});
/* comment out this function because '$.browser' has been removed from jquery 1.9, see:
http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
TODO: use jquery migrate to have $.browser support for IE8;
if ($.browser.msie) {
if ($.browser.version >= 8.0 && $.browser.version < 9.0)
{
// scaling bug in IE8.. iframe has to be 4 times bigger
$( "#iframe" ).css('width', 1024 * 4);
$( "#iframe" ).css('height', 768 * 4);
}
$( "#iframe" ).css('zoom', '0.25');
}
*/
restoreOrder();
});

View File

@ -1,45 +0,0 @@
$(function() {
$.datepicker.regional[gettext('en')] = {
prevText: gettext('previous month'),
nextText: gettext('next month'),
monthNames: [
gettext('January'), gettext('February'), gettext('March'),
gettext('April'), gettext('May'), gettext('June'),
gettext('July'), gettext('August'), gettext('September'),
gettext('October'), gettext('November'), gettext('December')
],
monthNamesShort: [
gettext('Jan'), gettext('Feb'), gettext('Mar'),
gettext('Apr'), gettext('May'), gettext('Jun'),
gettext('Jul'), gettext('Aug'), gettext('Sep'),
gettext('Oct'), gettext('Nov'), gettext('Dec')
],
dayNames: [
gettext('Sunday'), gettext('Monday'), gettext('Tuesday'), gettext('Wednesday'),
gettext('Thursday'), gettext('Friday'), gettext('Saturday')
],
dayNamesMin: [
gettext('Su'), gettext('Mo'), gettext('Tu'), gettext('We'),
gettext('Th'), gettext('Fr'), gettext('Sa')
],
dayNamesShort: [
gettext('Su'), gettext('Mo'), gettext('Tu'), gettext('We'),
gettext('Th'), gettext('Fr'), gettext('Sa')
],
dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false
};
$.datepicker.setDefaults($.datepicker.regional[gettext('en')]);
$("#id_agenda_start_event_date_time").datetimepicker (
{
hour: 12,
timeFormat: 'HH:mm',
timeText: gettext('Time'),
hourText: gettext('Hour'),
minuteText: gettext('Minute'),
currentText: gettext('Current time'),
closeText: gettext('Close')
}
);
});

View File

@ -1,429 +0,0 @@
/*
* jQuery UI Nested Sortable
* v 1.3.5 / 21 jun 2012
* http://mjsarfatti.com/code/nestedSortable
*
* Depends on:
* jquery.ui.sortable.js 1.8+
*
* Copyright (c) 2010-2012 Manuele J Sarfatti
* Licensed under the MIT License
* http://www.opensource.org/licenses/mit-license.php
*/
(function($) {
$.widget("mjs.nestedSortable", $.extend({}, $.ui.sortable.prototype, {
options: {
tabSize: 20,
disableNesting: 'mjs-nestedSortable-no-nesting',
errorClass: 'mjs-nestedSortable-error',
doNotClear: false,
listType: 'ol',
maxLevels: 0,
protectRoot: false,
rootID: null,
rtl: false,
isAllowed: function(item, parent) { return true; }
},
_create: function() {
this.element.data('sortable', this.element.data('nestedSortable'));
if (!this.element.is(this.options.listType))
throw new Error('nestedSortable: Please check the listType option is set to your actual list type');
return $.ui.sortable.prototype._create.apply(this, arguments);
},
destroy: function() {
this.element
.removeData("nestedSortable")
.unbind(".nestedSortable");
return $.ui.sortable.prototype.destroy.apply(this, arguments);
},
_mouseDrag: function(event) {
//Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
if (!this.lastPositionAbs) {
this.lastPositionAbs = this.positionAbs;
}
var o = this.options;
//Do scrolling
if(this.options.scroll) {
var scrolled = false;
if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
} else {
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
}
if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this, event);
}
//Regenerate the absolute position used for position checks
this.positionAbs = this._convertPositionTo("absolute");
// Find the top offset before rearrangement,
var previousTopOffset = this.placeholder.offset().top;
//Set the helper position
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
//Rearrange
for (var i = this.items.length - 1; i >= 0; i--) {
//Cache variables and intersection, continue if no intersection
var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
if (!intersection) continue;
if(itemElement != this.currentItem[0] //cannot intersect with itself
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
&& !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
&& (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
) {
$(itemElement).mouseenter();
this.direction = intersection == 1 ? "down" : "up";
if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
$(itemElement).mouseleave();
this._rearrange(event, item);
} else {
break;
}
// Clear emtpy ul's/ol's
this._clearEmpty(itemElement);
this._trigger("change", event, this._uiHash());
break;
}
}
var parentItem = (this.placeholder[0].parentNode.parentNode &&
$(this.placeholder[0].parentNode.parentNode).closest('.ui-sortable').length)
? $(this.placeholder[0].parentNode.parentNode)
: null,
level = this._getLevel(this.placeholder),
childLevels = this._getChildLevels(this.helper);
// To find the previous sibling in the list, keep backtracking until we hit a valid list item.
var previousItem = this.placeholder[0].previousSibling ? $(this.placeholder[0].previousSibling) : null;
if (previousItem != null) {
while (previousItem[0].nodeName.toLowerCase() != 'li' || previousItem[0] == this.currentItem[0] || previousItem[0] == this.helper[0]) {
if (previousItem[0].previousSibling) {
previousItem = $(previousItem[0].previousSibling);
} else {
previousItem = null;
break;
}
}
}
// To find the next sibling in the list, keep stepping forward until we hit a valid list item.
var nextItem = this.placeholder[0].nextSibling ? $(this.placeholder[0].nextSibling) : null;
if (nextItem != null) {
while (nextItem[0].nodeName.toLowerCase() != 'li' || nextItem[0] == this.currentItem[0] || nextItem[0] == this.helper[0]) {
if (nextItem[0].nextSibling) {
nextItem = $(nextItem[0].nextSibling);
} else {
nextItem = null;
break;
}
}
}
var newList = document.createElement(o.listType);
this.beyondMaxLevels = 0;
// If the item is moved to the left, send it to its parent's level unless there are siblings below it.
if (parentItem != null && nextItem == null &&
(o.rtl && (this.positionAbs.left + this.helper.outerWidth() > parentItem.offset().left + parentItem.outerWidth()) ||
!o.rtl && (this.positionAbs.left < parentItem.offset().left))) {
parentItem.after(this.placeholder[0]);
this._clearEmpty(parentItem[0]);
this._trigger("change", event, this._uiHash());
}
// If the item is below a sibling and is moved to the right, make it a child of that sibling.
else if (previousItem != null &&
(o.rtl && (this.positionAbs.left + this.helper.outerWidth() < previousItem.offset().left + previousItem.outerWidth() - o.tabSize) ||
!o.rtl && (this.positionAbs.left > previousItem.offset().left + o.tabSize))) {
this._isAllowed(previousItem, level, level+childLevels+1);
if (!previousItem.children(o.listType).length) {
previousItem[0].appendChild(newList);
}
// If this item is being moved from the top, add it to the top of the list.
if (previousTopOffset && (previousTopOffset <= previousItem.offset().top)) {
previousItem.children(o.listType).prepend(this.placeholder);
}
// Otherwise, add it to the bottom of the list.
else {
previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);
}
this._trigger("change", event, this._uiHash());
}
else {
this._isAllowed(parentItem, level, level+childLevels);
}
//Post events to containers
this._contactContainers(event);
//Interconnect with droppables
if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
//Call callbacks
this._trigger('sort', event, this._uiHash());
this.lastPositionAbs = this.positionAbs;
return false;
},
_mouseStop: function(event, noPropagation) {
// If the item is in a position not allowed, send it back
if (this.beyondMaxLevels) {
this.placeholder.removeClass(this.options.errorClass);
if (this.domPosition.prev) {
$(this.domPosition.prev).after(this.placeholder);
} else {
$(this.domPosition.parent).prepend(this.placeholder);
}
this._trigger("revert", event, this._uiHash());
}
// Clean last empty ul/ol
for (var i = this.items.length - 1; i >= 0; i--) {
var item = this.items[i].item[0];
this._clearEmpty(item);
}
$.ui.sortable.prototype._mouseStop.apply(this, arguments);
},
serialize: function(options) {
var o = $.extend({}, this.options, options),
items = this._getItemsAsjQuery(o && o.connected),
str = [];
$(items).each(function() {
var res = ($(o.item || this).attr(o.attribute || 'id') || '')
.match(o.expression || (/(.+)[-=_](.+)/)),
pid = ($(o.item || this).parent(o.listType)
.parent(o.items)
.attr(o.attribute || 'id') || '')
.match(o.expression || (/(.+)[-=_](.+)/));
if (res) {
str.push(((o.key || res[1]) + '[' + (o.key && o.expression ? res[1] : res[2]) + ']')
+ '='
+ (pid ? (o.key && o.expression ? pid[1] : pid[2]) : o.rootID));
}
});
if(!str.length && o.key) {
str.push(o.key + '=');
}
return str.join('&');
},
toHierarchy: function(options) {
var o = $.extend({}, this.options, options),
sDepth = o.startDepthCount || 0,
ret = [];
$(this.element).children(o.items).each(function () {
var level = _recursiveItems(this);
ret.push(level);
});
return ret;
function _recursiveItems(item) {
var id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
if (id) {
var currentItem = {"id" : id[2]};
if ($(item).children(o.listType).children(o.items).length > 0) {
currentItem.children = [];
$(item).children(o.listType).children(o.items).each(function() {
var level = _recursiveItems(this);
currentItem.children.push(level);
});
}
return currentItem;
}
}
},
toArray: function(options) {
var o = $.extend({}, this.options, options),
sDepth = o.startDepthCount || 0,
ret = [],
left = 2;
ret.push({
"item_id": o.rootID,
"parent_id": 'none',
"depth": sDepth,
"left": '1',
"right": ($(o.items, this.element).length + 1) * 2
});
$(this.element).children(o.items).each(function () {
left = _recursiveArray(this, sDepth + 1, left);
});
ret = ret.sort(function(a,b){ return (a.left - b.left); });
return ret;
function _recursiveArray(item, depth, left) {
var right = left + 1,
id,
pid;
if ($(item).children(o.listType).children(o.items).length > 0) {
depth ++;
$(item).children(o.listType).children(o.items).each(function () {
right = _recursiveArray($(this), depth, right);
});
depth --;
}
id = ($(item).attr(o.attribute || 'id')).match(o.expression || (/(.+)[-=_](.+)/));
if (depth === sDepth + 1) {
pid = o.rootID;
} else {
var parentItem = ($(item).parent(o.listType)
.parent(o.items)
.attr(o.attribute || 'id'))
.match(o.expression || (/(.+)[-=_](.+)/));
pid = parentItem[2];
}
if (id) {
ret.push({"item_id": id[2], "parent_id": pid, "depth": depth, "left": left, "right": right});
}
left = right + 1;
return left;
}
},
_clearEmpty: function(item) {
var emptyList = $(item).children(this.options.listType);
if (emptyList.length && !emptyList.children().length && !this.options.doNotClear) {
emptyList.remove();
}
},
_getLevel: function(item) {
var level = 1;
if (this.options.listType) {
var list = item.closest(this.options.listType);
while (list && list.length > 0 &&
!list.is('.ui-sortable')) {
level++;
list = list.parent().closest(this.options.listType);
}
}
return level;
},
_getChildLevels: function(parent, depth) {
var self = this,
o = this.options,
result = 0;
depth = depth || 0;
$(parent).children(o.listType).children(o.items).each(function (index, child) {
result = Math.max(self._getChildLevels(child, depth + 1), result);
});
return depth ? result + 1 : result;
},
_isAllowed: function(parentItem, level, levels) {
var o = this.options,
isRoot = $(this.domPosition.parent).hasClass('ui-sortable') ? true : false,
maxLevels = this.placeholder.closest('.ui-sortable').nestedSortable('option', 'maxLevels'); // this takes into account the maxLevels set to the recipient list
// Is the root protected?
// Are we trying to nest under a no-nest?
// Are we nesting too deep?
if (!o.isAllowed(this.currentItem, parentItem) ||
parentItem && parentItem.hasClass(o.disableNesting) ||
o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) {
this.placeholder.addClass(o.errorClass);
if (maxLevels < levels && maxLevels != 0) {
this.beyondMaxLevels = levels - maxLevels;
} else {
this.beyondMaxLevels = 1;
}
} else {
if (maxLevels < levels && maxLevels != 0) {
this.placeholder.addClass(o.errorClass);
this.beyondMaxLevels = levels - maxLevels;
} else {
this.placeholder.removeClass(o.errorClass);
this.beyondMaxLevels = 0;
}
}
}
}));
$.mjs.nestedSortable.prototype.options = $.extend({}, $.ui.sortable.prototype.options, $.mjs.nestedSortable.prototype.options);
})(jQuery);

View File

@ -1,13 +0,0 @@
/*
* jQuery UI Slider Access
* By: Trent Richardson [http://trentrichardson.com]
* Version 0.3
* Last Modified: 10/20/2012
*
* Copyright 2011 Trent Richardson
* Dual licensed under the MIT and GPL licenses.
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
*
*/
(function($){$.fn.extend({sliderAccess:function(options){options=options||{};options.touchonly=options.touchonly!==undefined?options.touchonly:true;if(options.touchonly===true&&!("ontouchend"in document))return $(this);return $(this).each(function(i,obj){var $t=$(this),o=$.extend({},{where:'after',step:$t.slider('option','step'),upIcon:'ui-icon-plus',downIcon:'ui-icon-minus',text:false,upText:'+',downText:'-',buttonset:true,buttonsetTag:'span',isRTL:false},options),$buttons=$('<'+o.buttonsetTag+' class="ui-slider-access">'+'<button data-icon="'+o.downIcon+'" data-step="'+(o.isRTL?o.step:o.step*-1)+'">'+o.downText+'</button>'+'<button data-icon="'+o.upIcon+'" data-step="'+(o.isRTL?o.step*-1:o.step)+'">'+o.upText+'</button>'+'</'+o.buttonsetTag+'>');$buttons.children('button').each(function(j,jobj){var $jt=$(this);$jt.button({text:o.text,icons:{primary:$jt.data('icon')}}).click(function(e){var step=$jt.data('step'),curr=$t.slider('value'),newval=curr+=step*1,minval=$t.slider('option','min'),maxval=$t.slider('option','max'),slidee=$t.slider("option","slide")||function(){},stope=$t.slider("option","stop")||function(){};e.preventDefault();if(newval<minval||newval>maxval)return;$t.slider('value',newval);slidee.call($t,null,{value:newval});stope.call($t,null,{value:newval})})});$t[o.where]($buttons);if(o.buttonset){$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();$buttons.eq(0).addClass('ui-corner-left');$buttons.eq(1).addClass('ui-corner-right')}var bOuterWidth=$buttons.css({marginLeft:((o.where=='after'&&!o.isRTL)||(o.where=='before'&&o.isRTL)?10:0),marginRight:((o.where=='before'&&!o.isRTL)||(o.where=='after'&&o.isRTL)?10:0)}).outerWidth(true)+5;var tOuterWidth=$t.outerWidth(true);$t.css('display','inline-block').width(tOuterWidth-bOuterWidth)})}})})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,382 +0,0 @@
/*
* Better Select Multiple - jQuery Plugin
*
* based on Alternate Select Multiple (asmSelect) 1.0.4a beta (http://www.ryancramer.com/projects/asmselect/)
*
* Copyright (c) 2009 by Ryan Cramer - http://www.ryancramer.com
* Copyright (c) 2010-2013 by Victor Berchet - http://www.github.com/vicb
*
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*
* bsmSelect version: v1.4.6 - 2013-03-02
*/
(function($) {
function BsmSelect(target, options)
{
this.$original = $(target); // the original select multiple
this.buildingSelect = false; // is the new select being constructed right now?
this.ieClick = false; // in IE, has a click event occurred? ignore if not
this.ignoreOriginalChangeEvent = false; // originalChangeEvent bypassed when this is true
this.options = options;
this.buildDom();
}
BsmSelect.prototype = {
/**
* Generate an UID
*/
generateUid: function(index) {
return (this.uid = this.options.containerClass + index);
},
/**
* Build the DOM for bsmSelect
*/
buildDom: function() {
var self = this, o = this.options;
if (o.addItemTarget === 'original') {
$('option', this.$original).each(function(i, o) {
if ($(o).data('bsm-order') === undefined) { $(o).data('bsm-order', i); }
});
}
for (var index = 0; $('#' + this.generateUid(index)).size(); index++) {}
this.$select = $('<select>', {
'class': o.selectClass,
name: o.selectClass + this.uid,
id: o.selectClass + this.uid,
change: $.proxy(this.selectChangeEvent, this),
click: $.proxy(this.selectClickEvent, this)
});
this.$list = $.isFunction(o.listType)
? o.listType(this.$original)
: $('<' + o.listType + '>', { id: o.listClass + this.uid });
this.$list.addClass(o.listClass);
this.$container = $('<div>', { 'class': o.containerClass, id: this.uid });
this.buildSelect();
this.$original.change($.proxy(this.originalChangeEvent, this)).wrap(this.$container).before(this.$select);
// if the list isn't already in the document, add it (it might be inserted by a custom callback)
if (!this.$list.parent().length) { this.$original.before(this.$list); }
if (this.$original.attr('id')) {
$('label[for=' + this.$original.attr('id') + ']').attr('for', this.$select.attr('id'));
}
// set up remove event (may be a link, or the list item itself)
this.$list.delegate('.' + o.removeClass, 'click', function() {
self.dropListItem($(this).closest('li'));
return false;
});
$.each(o.plugins, function() { this.init(self); });
},
/**
* Triggered when an item has been selected
* Check to make sure it's not an IE screwup, and add it to the list
*/
selectChangeEvent: function() {
if ($.browser && $.browser.msie && $.browser.version < 7 && !this.ieClick) { return; }
var bsmOpt = $('option:selected:eq(0)', this.$select);
if (bsmOpt.data('orig-option')) {
this.addListItem(bsmOpt);
this.triggerOriginalChange(bsmOpt.data('orig-option'), 'add');
}
this.ieClick = false;
},
/**
* IE6 lets you scroll around in a select without it being pulled down
* making sure a click preceded the change() event reduces the chance
* if unintended items being added. there may be a better solution?
*/
selectClickEvent: function() {
this.ieClick = true;
},
/**
* Rebuild bsmSelect when the 'change' event is triggered on the original select
*/
originalChangeEvent: function() {
if (this.ignoreOriginalChangeEvent) {
// We don't want to rebuild everything when an item is added / droped
this.ignoreOriginalChangeEvent = false;
} else {
this.buildSelect();
// opera has an issue where it needs a force redraw, otherwise
// the items won't appear until something else forces a redraw
if ($.browser && $.browser.opera) { this.$list.hide().show(); }
}
},
/**
* Build the DOM for the new select
*/
buildSelect: function() {
var self = this;
this.buildingSelect = true;
// add a first option to be the home option / default selectLabel
this.$select.empty().prepend($('<option value=""></option>').text(this.$original.attr('title') || this.options.title));
this.$list.empty();
this.$original.children().each(function() {
if ($(this).is('option')) {
self.addSelectOption(self.$select, $(this));
} else if ($(this).is('optgroup')) {
self.addSelectOptionGroup(self.$select, $(this));
}
});
if (!this.options.debugMode) { this.$original.hide(); }
this.selectFirstItem();
this.buildingSelect = false;
},
/**
* Append an option to the new select
*
* @param {jQuery} $parent Where to append the option
* @param {jQuery} $origOpt Option from the original select
*/
addSelectOption: function ($parent, $origOpt) {
var $bsmOpt = $('<option>', {
text: $origOpt.text(),
val: $origOpt.val() }).appendTo($parent).data('orig-option', $origOpt),
isSelected = $origOpt.is(':selected'),
isDisabled = $origOpt.is(':disabled');
$origOpt.data('bsm-option', $bsmOpt);
if (isSelected && !isDisabled) {
this.addListItem($bsmOpt);
this.disableSelectOption($bsmOpt);
} else if (!isSelected && isDisabled) {
this.disableSelectOption($bsmOpt);
}
},
/**
* Append an option group to the new select
*
* @param {jQuery} $parent Where to append the group
* @param {jQuery} $group Model group from the original select
*/
addSelectOptionGroup: function($parent, $group)
{
var self = this,
$G = $('<optgroup>', { label: $group.attr('label')} ).appendTo($parent);
if ($group.is(':disabled')) { $G.attr('disabled', 'disabled'); }
$('option', $group).each(function() { self.addSelectOption($G, $(this)); });
},
/**
* Select the first item of the new select
*/
selectFirstItem: function() {
$('option:eq(0)', this.$select).attr('selected', 'selected');
},
/**
* Make an option disabled, indicating that it's already been selected
* because safari is the only browser that makes disabled items look 'disabled'
* we apply a class that reproduces the disabled look in other browsers
*
* @param {jQuery} $bsmOpt Option from the new select
*/
disableSelectOption: function($bsmOpt) {
$bsmOpt.addClass(this.options.optionDisabledClass)
.removeAttr('selected')
.attr('disabled', 'disabled')
.toggle(!this.options.hideWhenAdded);
if ($.browser && $.browser.msie && $.browser.version < 8) { this.$select.hide().show(); } // this forces IE to update display
},
/**
* Enable a select option
*
* @param {jQuery} $bsmOpt Option from the new select
*/
enableSelectOption: function($bsmOpt) {
$bsmOpt.removeClass(this.options.optionDisabledClass)
.removeAttr('disabled')
.toggle(!this.options.hideWhenAdded);
if ($.browser && $.browser.msie && $.browser.version < 8) { this.$select.hide().show(); } // this forces IE to update display
},
/**
* Append an item corresponding to the option to the list
*
* @param {jQuery} $bsmOpt Option from the new select
*/
addListItem: function($bsmOpt) {
var $item,
$origOpt = $bsmOpt.data('orig-option'),
o = this.options;
if (!$origOpt) { return; } // this is the first item, selectLabel
if (!this.buildingSelect) {
if ($origOpt.is(':selected')) { return; } // already have it
$origOpt.attr('selected', 'selected');
}
$item = $('<li>', { 'class': o.listItemClass })
.append($('<span>', { 'class': o.listItemLabelClass, html: o.extractLabel($bsmOpt, o)}))
.append($('<a>', { href: '#', 'class': o.removeClass, html: o.removeLabel }))
.data('bsm-option', $bsmOpt);
this.disableSelectOption($bsmOpt.data('item', $item));
switch (o.addItemTarget) {
case 'bottom':
this.$list.append($item.hide());
break;
case 'original':
var order = $origOpt.data('bsm-order'), inserted = false;
this.$list.children().each(function() {
if (order < $(this).data('bsm-option').data('orig-option').data('bsm-order')) {
$item.hide().insertBefore(this);
inserted = true;
return false;
}
});
if (!inserted) { this.$list.append($item.hide()); }
break;
default:
this.$list.prepend($item.hide());
}
if (this.buildingSelect) {
$.bsmSelect.effects.show($item);
} else {
o.showEffect($item);
o.highlightEffect(this.$select, $item, o.highlightAddedLabel, this.options);
this.selectFirstItem();
}
},
/**
* Remove an item from the list of selection
*
* @param {jQuey} $item A list item
*/
dropListItem: function($item) {
var $bsmOpt = $item.data('bsm-option'), o = this.options;
$bsmOpt.removeData('item').data('orig-option').removeAttr('selected');
(this.buildingSelect ? $.bsmSelect.effects.remove : o.hideEffect)($item);
this.enableSelectOption($bsmOpt);
o.highlightEffect(this.$select, $item, o.highlightRemovedLabel, o);
this.triggerOriginalChange($bsmOpt.data('orig-option'), 'drop');
},
/**
* Trigger a change event on the original select multiple
* so that other scripts can pick them up
*
* @param {jQuery} $origOpt The option from the original select
* @param {String} type Event type
*/
triggerOriginalChange: function($origOpt, type) {
this.ignoreOriginalChangeEvent = true;
this.$original.trigger('change', [{
option: $origOpt,
value: $origOpt.val(),
item: $origOpt.data('bsm-option').data('item'),
type: type
}]);
}
};
$.fn.bsmSelect = function(customOptions) {
var options = $.extend({}, $.bsmSelect.conf, customOptions);
return this.each(function() {
var bsm = $(this).data("bsmSelect");
if (!bsm) {
bsm = new BsmSelect($(this), options);
$(this).data("bsmSelect", bsm);
}
});
};
$.bsmSelect = {};
$.extend($.bsmSelect, {
effects: {
show: function($el) { $el.show(); },
remove: function($el) { $el.remove(); },
highlight: function ($select, $item, label, conf) {
var $highlight,
id = $select.attr('id') + conf.highlightClass;
$('#' + id).remove();
$highlight = $('<span>', {
'class': conf.highlightClass,
id: id,
html: label + $item.children('.' + conf.listItemLabelClass).first().text()
}).hide();
$select.after($highlight.fadeIn('fast').delay(50).fadeOut('slow', function() { $(this).remove(); }));
},
verticalListAdd: function ($el) {
$el.animate({ opacity: 'show', height: 'show' }, 100, function() {
$(this).animate({ height: '+=2px' }, 100, function() {
$(this).animate({ height: '-=2px' }, 100);
});
});
},
verticalListRemove: function($el) {
$el.animate({ opacity: 'hide', height: 'hide' }, 100, function() {
$(this).prev('li').animate({ height: '-=2px' }, 100, function() {
$(this).animate({ height: '+=2px' }, 100);
});
$(this).remove();
});
}
},
plugins: {
}
});
// Default configuration
$.bsmSelect.conf = {
listType: 'ol', // Ordered list 'ol', or unordered list 'ul'
showEffect: $.bsmSelect.effects.show,
hideEffect: $.bsmSelect.effects.remove,
highlightEffect: $.noop,
addItemTarget: 'bottom', // Where to place new selected items in list: top or bottom
hideWhenAdded: false, // Hide the option when added to the list? works only in FF
debugMode: false, // Debug mode keeps original select visible
title: '---------', // Text used for the default select label
removeLabel: 'remove', // HTML used for the 'remove' link
highlightAddedLabel: 'Added: ', // Text that precedes highlight of added item
highlightRemovedLabel: 'Removed: ', // Text that precedes highlight of removed item
extractLabel: function($o) { return $o.html(); },
plugins: [], // An array of plugin objects to enable
containerClass: 'bsmContainer', // Class for container that wraps this widget
selectClass: 'bsmSelect', // Class for the newly created <select>
optionDisabledClass: 'bsmOptionDisabled', // Class for items that are already selected / disabled
listClass: 'bsmList', // Class for the list ($list)
listItemClass: 'bsmListItem', // Class for the <li> list items
listItemLabelClass: 'bsmListItemLabel', // Class for the label text that appears in list items
removeClass: 'bsmListItemRemove', // Class given to the 'remove' link
highlightClass: 'bsmHighlight' // Class given to the highlight <span>
};
})(jQuery);

File diff suppressed because it is too large Load Diff

View File

@ -1,78 +0,0 @@
/**
* jQuery Once Plugin v1.2
* http://plugins.jquery.com/project/once
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function ($) {
var cache = {}, uuid = 0;
/**
* Filters elements by whether they have not yet been processed.
*
* @param id
* (Optional) If this is a string, then it will be used as the CSS class
* name that is applied to the elements for determining whether it has
* already been processed. The elements will get a class in the form of
* "id-processed".
*
* If the id parameter is a function, it will be passed off to the fn
* parameter and the id will become a unique identifier, represented as a
* number.
*
* When the id is neither a string or a function, it becomes a unique
* identifier, depicted as a number. The element's class will then be
* represented in the form of "jquery-once-#-processed".
*
* Take note that the id must be valid for usage as an element's class name.
* @param fn
* (Optional) If given, this function will be called for each element that
* has not yet been processed. The function's return value follows the same
* logic as $.each(). Returning true will continue to the next matched
* element in the set, while returning false will entirely break the
* iteration.
*/
$.fn.once = function (id, fn) {
if (typeof id != 'string') {
// Generate a numeric ID if the id passed can't be used as a CSS class.
if (!(id in cache)) {
cache[id] = ++uuid;
}
// When the fn parameter is not passed, we interpret it from the id.
if (!fn) {
fn = id;
}
id = 'jquery-once-' + cache[id];
}
// Remove elements from the set that have already been processed.
var name = id + '-processed';
var elements = this.not('.' + name).addClass(name);
return $.isFunction(fn) ? elements.each(fn) : elements;
};
/**
* Filters elements that have been processed once already.
*
* @param id
* A required string representing the name of the class which should be used
* when filtering the elements. This only filters elements that have already
* been processed by the once function. The id should be the same id that
* was originally passed to the once() function.
* @param fn
* (Optional) If given, this function will be called for each element that
* has not yet been processed. The function's return value follows the same
* logic as $.each(). Returning true will continue to the next matched
* element in the set, while returning false will entirely break the
* iteration.
*/
$.fn.removeOnce = function (id, fn) {
var name = id + '-processed';
var elements = this.filter('.' + name).removeClass(name);
return $.isFunction(fn) ? elements.each(fn) : elements;
};
})(jQuery);

View File

@ -1,487 +0,0 @@
/*
* jQuery Templating Plugin
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
(function( jQuery, undefined ){
var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,
newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = [];
function newTmplItem( options, parentItem, fn, data ) {
// Returns a template item data structure for a new rendered instance of a template (a 'template item').
// The content field is a hierarchical array of strings and nested items (to be
// removed and replaced by nodes field of dom elements, once inserted in DOM).
var newItem = {
data: data || (parentItem ? parentItem.data : {}),
_wrap: parentItem ? parentItem._wrap : null,
tmpl: null,
parent: parentItem || null,
nodes: [],
calls: tiCalls,
nest: tiNest,
wrap: tiWrap,
html: tiHtml,
update: tiUpdate
};
if ( options ) {
jQuery.extend( newItem, options, { nodes: [], parent: parentItem } );
}
if ( fn ) {
// Build the hierarchical content to be used during insertion into DOM
newItem.tmpl = fn;
newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem );
newItem.key = ++itemKey;
// Keep track of new template item, until it is stored as jQuery Data on DOM element
(stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem;
}
return newItem;
}
// Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).
jQuery.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems,
parent = this.length === 1 && this[0].parentNode;
appendToTmplItems = newTmplItems || {};
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
ret = this;
} else {
for ( i = 0, l = insert.length; i < l; i++ ) {
cloneIndex = i;
elems = (i > 0 ? this.clone(true) : this).get();
jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
ret = ret.concat( elems );
}
cloneIndex = 0;
ret = this.pushStack( ret, name, insert.selector );
}
tmplItems = appendToTmplItems;
appendToTmplItems = null;
jQuery.tmpl.complete( tmplItems );
return ret;
};
});
jQuery.fn.extend({
// Use first wrapped element as template markup.
// Return wrapped set of template items, obtained by rendering template against data.
tmpl: function( data, options, parentItem ) {
return jQuery.tmpl( this[0], data, options, parentItem );
},
// Find which rendered template item the first wrapped DOM element belongs to
tmplItem: function() {
return jQuery.tmplItem( this[0] );
},
// Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.
template: function( name ) {
return jQuery.template( name, this[0] );
},
domManip: function( args, table, callback, options ) {
// This appears to be a bug in the appendTo, etc. implementation
// it should be doing .call() instead of .apply(). See #6227
if ( args[0] && args[0].nodeType ) {
var dmArgs = jQuery.makeArray( arguments ), argsLength = args.length, i = 0, tmplItem;
while ( i < argsLength && !(tmplItem = jQuery.data( args[i++], "tmplItem" ))) {}
if ( argsLength > 1 ) {
dmArgs[0] = [jQuery.makeArray( args )];
}
if ( tmplItem && cloneIndex ) {
dmArgs[2] = function( fragClone ) {
// Handler called by oldManip when rendered template has been inserted into DOM.
jQuery.tmpl.afterManip( this, fragClone, callback );
};
}
oldManip.apply( this, dmArgs );
} else {
oldManip.apply( this, arguments );
}
cloneIndex = 0;
if ( !appendToTmplItems ) {
jQuery.tmpl.complete( newTmplItems );
}
return this;
}
});
jQuery.extend({
// Return wrapped set of template items, obtained by rendering template against data.
tmpl: function( tmpl, data, options, parentItem ) {
var ret, topLevel = !parentItem;
if ( topLevel ) {
// This is a top-level tmpl call (not from a nested template using {{tmpl}})
parentItem = topTmplItem;
tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl );
wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level
} else if ( !tmpl ) {
// The template item is already associated with DOM - this is a refresh.
// Re-evaluate rendered template for the parentItem
tmpl = parentItem.tmpl;
newTmplItems[parentItem.key] = parentItem;
parentItem.nodes = [];
if ( parentItem.wrapped ) {
updateWrapped( parentItem, parentItem.wrapped );
}
// Rebuild, without creating a new template item
return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) ));
}
if ( !tmpl ) {
return []; // Could throw...
}
if ( typeof data === "function" ) {
data = data.call( parentItem || {} );
}
if ( options && options.wrapped ) {
updateWrapped( options, options.wrapped );
}
ret = jQuery.isArray( data ) ?
jQuery.map( data, function( dataItem ) {
return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
}) :
[ newTmplItem( options, parentItem, tmpl, data ) ];
return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret;
},
// Return rendered template item for an element.
tmplItem: function( elem ) {
var tmplItem;
if ( elem instanceof jQuery ) {
elem = elem[0];
}
while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {}
return tmplItem || topTmplItem;
},
// Set:
// Use $.template( name, tmpl ) to cache a named template,
// where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.
// Use $( "selector" ).template( name ) to provide access by name to a script block template declaration.
// Get:
// Use $.template( name ) to access a cached template.
// Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )
// will return the compiled template, without adding a name reference.
// If templateString includes at least one HTML tag, $.template( templateString ) is equivalent
// to $.template( null, templateString )
template: function( name, tmpl ) {
if (tmpl) {
// Compile template and associate with name
if ( typeof tmpl === "string" ) {
// This is an HTML string being passed directly in.
tmpl = buildTmplFn( tmpl )
} else if ( tmpl instanceof jQuery ) {
tmpl = tmpl[0] || {};
}
if ( tmpl.nodeType ) {
// If this is a template block, use cached copy, or generate tmpl function and cache.
tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML ));
}
return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl;
}
// Return named compiled template
return name ? (typeof name !== "string" ? jQuery.template( null, name ):
(jQuery.template[name] ||
// If not in map, treat as a selector. (If integrated with core, use quickExpr.exec)
jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null;
},
encode: function( text ) {
// Do HTML encoding replacing < > & and ' and " by corresponding entities.
return ("" + text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;");
}
});
jQuery.extend( jQuery.tmpl, {
tag: {
"tmpl": {
_default: { $2: "null" },
open: "if($notnull_1){_=_.concat($item.nest($1,$2));}"
// tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions)
// This means that {{tmpl foo}} treats foo as a template (which IS a function).
// Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}.
},
"wrap": {
_default: { $2: "null" },
open: "$item.calls(_,$1,$2);_=[];",
close: "call=$item.calls();_=call._.concat($item.wrap(call,_));"
},
"each": {
_default: { $2: "$index, $value" },
open: "if($notnull_1){$.each($1a,function($2){with(this){",
close: "}});}"
},
"if": {
open: "if(($notnull_1) && $1a){",
close: "}"
},
"else": {
_default: { $1: "true" },
open: "}else if(($notnull_1) && $1a){"
},
"html": {
// Unecoded expression evaluation.
open: "if($notnull_1){_.push($1a);}"
},
"=": {
// Encoded expression evaluation. Abbreviated form is ${}.
_default: { $1: "$data" },
open: "if($notnull_1){_.push($.encode($1a));}"
},
"!": {
// Comment tag. Skipped by parser
open: ""
}
},
// This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events
complete: function( items ) {
newTmplItems = {};
},
// Call this from code which overrides domManip, or equivalent
// Manage cloning/storing template items etc.
afterManip: function afterManip( elem, fragClone, callback ) {
// Provides cloned fragment ready for fixup prior to and after insertion into DOM
var content = fragClone.nodeType === 11 ?
jQuery.makeArray(fragClone.childNodes) :
fragClone.nodeType === 1 ? [fragClone] : [];
// Return fragment to original caller (e.g. append) for DOM insertion
callback.call( elem, fragClone );
// Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.
storeTmplItems( content );
cloneIndex++;
}
});
//========================== Private helper functions, used by code above ==========================
function build( tmplItem, nested, content ) {
// Convert hierarchical content into flat string array
// and finally return array of fragments ready for DOM insertion
var frag, ret = content ? jQuery.map( content, function( item ) {
return (typeof item === "string") ?
// Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM.
(tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) :
// This is a child template item. Build nested template.
build( item, tmplItem, item._ctnt );
}) :
// If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}.
tmplItem;
if ( nested ) {
return ret;
}
// top-level template
ret = ret.join("");
// Support templates which have initial or final text nodes, or consist only of text
// Also support HTML entities within the HTML markup.
ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) {
frag = jQuery( middle ).get();
storeTmplItems( frag );
if ( before ) {
frag = unencode( before ).concat(frag);
}
if ( after ) {
frag = frag.concat(unencode( after ));
}
});
return frag ? frag : unencode( ret );
}
function unencode( text ) {
// Use createElement, since createTextNode will not render HTML entities correctly
var el = document.createElement( "div" );
el.innerHTML = text;
return jQuery.makeArray(el.childNodes);
}
// Generate a reusable function that will serve to render a template against data
function buildTmplFn( markup ) {
var body =
"var $=jQuery,call,_=[],$data=$item.data;" +
// Introduce the data as local variables using with(){}
"with($data){_.push('" +
// Convert the template into pure JavaScript
jQuery.trim(markup)
.replace( /([\\'])/g, "\\$1" )
.replace( /[\r\t\n]/g, " " )
.replace( /\$\{([^\}]*)\}/g, "{{= $1}}" )
.replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function( all, slash, type, fnargs, target, parens, args ) {
var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;
if ( !tag ) {
throw "Template command not found: " + type;
}
def = tag._default || [];
if ( parens && !/\w$/.test(target)) {
target += parens;
parens = "";
}
if ( target ) {
target = unescape( target );
args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : "");
// Support for target being things like a.toLowerCase();
// In that case don't call with template item as 'this' pointer. Just evaluate...
expr = parens ? (target.indexOf(".") > -1 ? target + parens : ("(" + target + ").call($item" + args)) : target;
exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))";
} else {
exprAutoFnDetect = expr = def.$1 || "null";
}
fnargs = unescape( fnargs );
return "');" +
tag[ slash ? "close" : "open" ]
.split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" )
.split( "$1a" ).join( exprAutoFnDetect )
.split( "$1" ).join( expr )
.split( "$2" ).join( fnargs ?
fnargs.replace( /\s*([^\(]+)\s*(\((.*?)\))?/g, function( all, name, parens, params ) {
params = params ? ("," + params + ")") : (parens ? ")" : "");
return params ? ("(" + name + ").call($item" + params) : all;
})
: (def.$2||"")
) +
"_.push('";
}) +
"');}return _;";
return new Function("jQuery","$item", body);
}
function updateWrapped( options, wrapped ) {
// Build the wrapped content.
options._wrap = build( options, true,
// Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.
jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()]
).join("");
}
function unescape( args ) {
return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null;
}
function outerHtml( elem ) {
var div = document.createElement("div");
div.appendChild( elem.cloneNode(true) );
return div.innerHTML;
}
// Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.
function storeTmplItems( content ) {
var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;
for ( i = 0, l = content.length; i < l; i++ ) {
if ( (elem = content[i]).nodeType !== 1 ) {
continue;
}
elems = elem.getElementsByTagName("*");
for ( m = elems.length - 1; m >= 0; m-- ) {
processItemKey( elems[m] );
}
processItemKey( elem );
}
function processItemKey( el ) {
var pntKey, pntNode = el, pntItem, tmplItem, key;
// Ensure that each rendered template inserted into the DOM has its own template item,
if ( (key = el.getAttribute( tmplItmAtt ))) {
while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }
if ( pntKey !== key ) {
// The next ancestor with a _tmplitem expando is on a different key than this one.
// So this is a top-level element within this template item
// Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.
pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;
if ( !(tmplItem = newTmplItems[key]) ) {
// The item is for wrapped content, and was copied from the temporary parent wrappedItem.
tmplItem = wrappedItems[key];
tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true );
tmplItem.key = ++itemKey;
newTmplItems[itemKey] = tmplItem;
}
if ( cloneIndex ) {
cloneTmplItem( key );
}
}
el.removeAttribute( tmplItmAtt );
} else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) {
// This was a rendered element, cloned during append or appendTo etc.
// TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.
cloneTmplItem( tmplItem.key );
newTmplItems[tmplItem.key] = tmplItem;
pntNode = jQuery.data( el.parentNode, "tmplItem" );
pntNode = pntNode ? pntNode.key : 0;
}
if ( tmplItem ) {
pntItem = tmplItem;
// Find the template item of the parent element.
// (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)
while ( pntItem && pntItem.key != pntNode ) {
// Add this element as a top-level node for this rendered template item, as well as for any
// ancestor items between this item and the item of its parent element
pntItem.nodes.push( el );
pntItem = pntItem.parent;
}
// Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...
delete tmplItem._ctnt;
delete tmplItem._wrap;
// Store template item as jQuery data on the element
jQuery.data( el, "tmplItem", tmplItem );
}
function cloneTmplItem( key ) {
key = key + keySuffix;
tmplItem = newClonedItems[key] =
(newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true ));
}
}
}
//---- Helper functions for template item ----
function tiCalls( content, tmpl, data, options ) {
if ( !content ) {
return stack.pop();
}
stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options });
}
function tiNest( tmpl, data, options ) {
// nested template, using {{tmpl}} tag
return jQuery.tmpl( jQuery.template( tmpl ), data, options, this );
}
function tiWrap( call, wrapped ) {
// nested template, using {{wrap}} tag
var options = call.options || {};
options.wrapped = wrapped;
// Apply the template, which may incorporate wrapped content,
return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item );
}
function tiHtml( filter, textOnly ) {
var wrapped = this._wrap;
return jQuery.map(
jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ),
function(e) {
return textOnly ?
e.innerText || e.textContent :
e.outerHTML || outerHtml(e);
});
}
function tiUpdate() {
var coll = this.nodes;
jQuery.tmpl( null, null, null, this).insertBefore( coll[0] );
jQuery( coll ).remove();
}
})( jQuery );

View File

@ -1,50 +0,0 @@
/*
* Natural Sort algorithm for Javascript - Version 0.6 - Released under MIT license
* Author: Jim Palmer (based on chunking idea from Dave Koelle)
* Contributors: Mike Grier (mgrier.com), Clint Priest, Kyle Adams, guillermo
*/
function naturalSort (a, b) {
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,
sre = /(^[ ]*|[ ]*$)/g,
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
hre = /^0x[0-9a-f]+$/i,
ore = /^0/,
// convert all to strings and trim()
x = a.toString().replace(sre, '') || '',
y = b.toString().replace(sre, '') || '',
// chunk/tokenize
xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
// numeric, hex or date detection
xD = parseInt(x.match(hre)) || (xN.length != 1 && x.match(dre) && Date.parse(x)),
yD = parseInt(y.match(hre)) || xD && y.match(dre) && Date.parse(y) || null;
// first try and sort Hex codes or Dates
if (yD)
if ( xD < yD ) return -1;
else if ( xD > yD ) return 1;
// natural sorting through split numeric strings and default strings
for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {
// find floats not starting with '0', string or 0 if not defined (Clint Priest)
oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
// handle numeric vs string comparison - number < string - (Kyle Adams)
if (isNaN(oFxNcL) !== isNaN(oFyNcL)) return (isNaN(oFxNcL)) ? 1 : -1;
// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
else if (typeof oFxNcL !== typeof oFyNcL) {
oFxNcL += '';
oFyNcL += '';
}
if (oFxNcL < oFyNcL) return -1;
if (oFxNcL > oFyNcL) return 1;
}
return 0;
}
// use naturalSort as dataTable extension
jQuery.fn.dataTableExt.oSort['natural-asc'] = function(a,b) {
return naturalSort(a,b);
};
jQuery.fn.dataTableExt.oSort['natural-desc'] = function(a,b) {
return naturalSort(a,b) * -1;
};

View File

@ -1,214 +0,0 @@
/*
* General JavaScript functions for all OpenSlides apps.
*
*/
$(function () {
$('.button').click(function (event) {
button = $(this);
if (button.hasClass('disabled')) {
event.preventDefault();
} else {
button.addClass('disabled');
setTimeout(function () {
button.removeClass('disabled');
}, 1000);
}
});
// activate an element to show it on projector
$('.activate_link').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: link.attr('href'),
dataType: 'json',
data: '',
success: function(data) {
$('.activate_link').removeClass('btn-primary');
$('.activate_link i').removeClass('icon-white');
$('tr').removeClass('activeline');
$('div').removeClass('activeline');
$('li').removeClass('activeline');
// is table line
if ( link.parent().parent().parent().is("tr") ) {
link.parent().parent().parent().addClass('activeline');
}
// is sortable list (agenda)
if ( link.parent().parent().parent().is("div") ) {
link.parent().parent().parent().addClass('activeline');
}
// is widget list item
if ( link.parent().is("li") ) {
link.parent().addClass('activeline');
}
link.addClass('btn-primary');
link.children('i').addClass('icon-white');
// set page_num to 1 if a pdf is activated
if ( link.hasClass('choose-pdf') ) {
$('#page_num').val(1);
}
}
});
});
// change status of an object (on/off)
$('.status_link').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: $(this).attr('href'),
dataType: 'json',
success: function(data) {
if (data.active) {
newclass = 'icon-on';
link.addClass('btn-success');
} else {
newclass = 'icon-off';
link.removeClass('btn-success');
}
link.children('i').removeClass('icon-off icon-on').addClass(newclass);
link.attr('href', data.link);
}
});
});
// Set the csrftoken to send post-data via ajax. See:
// https://docs.djangoproject.com/en/dev/ref/csrf/#ajax
var csrftoken = $.cookie('csrftoken');
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
});
function new_message(text, type) {
var message = $('#dummy-notification').clone(true);
$(message).removeAttr('id').addClass(type).html(text);
$('#notifications').append(message);
message.slideDown('fast');
}
// Functios for sidebar navigation
$(document).ready(function(){
// Resize navigation
$(window).resize(function(){
if($(this).width() < 1124) {
iconmenu();
if($(window).width() < 570) {
$('.table').each(function(){
if($(this).find('.table-wrapper').size() == 0) {
$(this).wrap('<div class="table-wrapper"></div>');
}
});
}
} else {
fullmenu();
}
});
if($(window).width() < 1124) {
iconmenu();
if($(window).width() < 570) {
$('.table').each(function(){
if($(this).find('.table-wrapper').size() == 0) {
$(this).wrap('<div class="table-wrapper"></div>');
}
});
}
} else {
fullmenu();
}
// Sticky navigation
$(window).scroll(function(){
var el = $('.leftmenu > ul');
if($(window).width() > 479) {
if ( ($(this).scrollTop() > 80) && ($(this).scrollLeft() < 10)) {
el.css({'position':'fixed','top':'10px','width':'14.15%'});
} else {
el.css({'position': 'relative', 'top': '0','width':'auto'});
}
} else {
if (($(this).scrollTop() > 130) && ($(this).scrollLeft() < 10)){
el.css({'position':'fixed','top':'10px','width':'14.15%'});
} else {
el.css({'position': 'relative', 'top': '0','width':'auto'});
}
}
});
// Submenu with drop down
$('.leftmenu a').click(function(e){
if($(this).siblings('ul').size() == 1){
e.preventDefault();
var submenu = $(this).siblings('ul');
if($(this).hasClass('open')) {
if($(this).parents('.leftmenu').hasClass('lefticon')) {
submenu.fadeOut();
} else {
submenu.slideUp('fast');
}
$(this).removeClass('open');
} else {
if($(this).parents('.leftmenu').hasClass('lefticon')) {
submenu.fadeIn();
} else {
submenu.slideDown('fast');
}
$(this).addClass('open');
}
}
});
// Tooltips
$(this).tooltip({
selector: "a[rel=tooltip]",
placement: 'bottom'
});
$('h1').tooltip({
selector: "a[rel=tooltip]",
placement: 'bottom'
});
$('.tooltip-left').tooltip({
placement: 'left'
});
$('.tooltip-right').tooltip({
placement: 'right'
});
$('.tooltip-top').tooltip({
placement: 'top'
});
$('.tooltip-bottom').tooltip({
placement: 'bottom'
});
//Popover
$(this).popover({
selector: "a[rel=popover]",
placement: 'bottom',
html: true
});
// Resize menu and content container
function iconmenu(){
$('.leftmenu').removeClass('span2').addClass('lefticon').addClass('span1');
$('.leftmenu > ul > li > a').each(function(){
atitle = $(this).text();
$(this).attr({'rel':'tooltip','title':atitle});
});
$('#content').removeClass('span10').addClass('span11');
}
function fullmenu(){
$('.leftmenu').removeClass('span1').removeClass('lefticon').addClass('span2');
$('.leftmenu > ul > li > a').each(function(){
$(this).attr({'rel':'','title':''});
});
$('#content').removeClass('span11').addClass('span10');
}
});

View File

@ -1,14 +0,0 @@
/*
* Styles for web interface of mediafile app
*
*/
/* Navigation icons (mapping to glyphicons-halflings) */
.icon-paperclip {
background-image: url("../img/glyphicons_062_paperclip.png");
background-position: 0;
}
.leftmenu ul li.active a span.ico i.icon-paperclip {
background-image: url("../img/glyphicons_062_paperclip_white.png");
}

View File

@ -1,33 +0,0 @@
/*
* Styles for projector slides of mediafile app
*
*/
/*** PDF presentation ***/
.canvas-container {
width: 100%;
text-align:center;
}
#presentation {
position: relative;
left:-75px;
top: -77px;
}
#presentation.fullscreen {
left: 0;
top: 0;
}
.fullscreen {
z-index: 1000!important;
left: 0!important;
top: 0!important;
right: 0!important;
background-color: #000000;
}
#footer.black {
display: none;
}
body.black {
background-color: #000000;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +0,0 @@
/*
* JavaScript functions for pdf presenter of OpenSlides.
*
*/
var pdf = PDFJS.getDocument(projector['pdf_url']);
projector['load_pdf_page'] = function(page) {
projector['pdf_page_num'] = page;
pdf.then(function(pdf) {
pdf.getPage(page).then(set_convas_size);
});
};
projector['load_pdf'] = function(data) {
projector['pdf_url'] = data['url'];
projector['pdf_page_num'] = data['page_num'];
pdf = PDFJS.getDocument(projector['pdf_url']);
projector['load_pdf_page'](projector['pdf_page_num']);
};
projector['toggle_fullscreen'] = function(fullscreen) {
projector['pdf_fullscreen'] = fullscreen;
content = $('#content');
presentation = $('#presentation');
footer = $('#footer');
body = $('body');
if (fullscreen) {
content.addClass('fullscreen');
presentation.addClass('fullscreen');
footer.addClass('black');
body.addClass('black');
} else {
content.removeClass('fullscreen');
presentation.removeClass('fullscreen');
footer.removeClass('black');
body.removeClass('black');
}
$(window).resize();
};
function scale_to_height(page) {
return page.getViewport(window.innerHeight / page.getViewport(1.0).height);
}
function scale_to_width(page) {
return page.getViewport(window.innerWidth / page.getViewport(1.0).width);
}
function get_correct_viewport(page, canvas) {
if(window.innerWidth > window.innerHeight) {
viewport = scale_to_height(page);
if (viewport.width > window.innerWidth) {
viewport = scale_to_width(page);
canvas.height = viewport.height;
canvas.width = window.innerWidth;
} else {
canvas.height = window.innerHeight;
canvas.width = viewport.width;
}
} else {
viewport = scale_to_width(page);
if (viewport.height > window.innerHeight) {
viewport = scale_to_height(page);
canvas.height = window.innerHeight;
canvas.width = viewport.width;
} else {
canvas.height = viewport.height;
canvas.width = window.innerWidth;
}
}
return viewport;
}
function set_convas_size(page) {
var canvas = document.getElementById('presentation');
var context = canvas.getContext('2d');
if (projector['pdf_fullscreen']) {
viewport = get_correct_viewport(page, canvas);
} else {
viewport = page.getViewport(window.innerWidth / page.getViewport(1.0).width);
canvas.height = viewport.height;
canvas.width = window.innerWidth;
}
page.render({canvasContext: context, viewport: viewport});
}
$(document).ready(function () {
$(window).resize(function() {
projector['load_pdf_page'](projector['pdf_page_num']);
});
if (projector['pdf_fullscreen']) {
if (!$('#content').hasClass('fullscreen')) {
$('#content').addClass('fullscreen');
$('#footer').addClass('black');
$('body').addClass('black');
}
}
$(window).resize();
});

View File

@ -1,53 +0,0 @@
/*
* Styles for web interface of motion app
*
*/
/*** motion version diff table ***/
table.diff, .diff_row {
font-size: 12px;
width: 100%;
border: 0px;
}
table.diff[rules][rules="groups"] > colgroup, table[rules][rules="groups"] > tfoot, table[rules][rules="groups"] > thead, table[rules][rules="groups"] > tbody {
border: none;
}
table.diff td {
padding: 0 !important;
border: none;
}
.diff_header {
background-color:#e0e0e0;
}
td.diff_header {
text-align:right;
display: none;
}
.diff_next {
background-color:#c0c0c0;
display: none;
}
.diff_add {
background-color:#aaffaa;
}
.diff_chg {
background-color:#ffff77;
}
.diff_sub {
background-color:#ffaaaa;
}
/*** motion vote result ***/
.well .result img {
margin-top: -4px;
}
.well .result {
margin-bottom: 10px;
}
.well .result hr {
border-top: 1px solid;
margin: 5px 0;
width: 10em;
}