Removed MySQL from requirements.
</button>
<button class="zoom-in">Powiększ</button>
<button class="zoom-out">Pomniejsz</button>
</button>
<button class="zoom-in">Powiększ</button>
<button class="zoom-out">Pomniejsz</button>
- <button class="change-gallery">Galeria</button>
+ {% if request.user.is_staff %}
+ <button class="change-gallery">Opcje</button>
+ {% endif %}
<div class="toolbar-end"> </div>
</div>
<div class="toolbar-end"> </div>
</div>
+ {% if request.user.is_staff %}
<div class="toolbar" id="change-gallery-toolbar">
<input type="text" value="" class="chosen-gallery" />
<button class="change-gallery-ok">Zmień galerię</button>
<button class="change-gallery-cancel">Anuluj</button>
<div class="toolbar-end"> </div>
</div>
<div class="toolbar" id="change-gallery-toolbar">
<input type="text" value="" class="chosen-gallery" />
<button class="change-gallery-ok">Zmień galerię</button>
<button class="change-gallery-cancel">Anuluj</button>
<div class="toolbar-end"> </div>
</div>
<div class="gallery-image">
<img src="" />
</div>
<div class="gallery-image">
<img src="" />
</div>
display: block;
float: left;
margin: 4px 0 2px 0;
display: block;
float: left;
margin: 4px 0 2px 0;
- padding: 0 5px 2px 5px;
border: none;
background: none;
}
border: none;
background: none;
}
+.toolbar button img {
+ margin: 0;
+ padding: 0;
+ margin-bottom: -3px;
+}
+
+
.toolbar select {
float: left;
margin: 1px 5px 1px 0;
.toolbar select {
float: left;
margin: 1px 5px 1px 0;
float: left;
font-size: 11px;
padding: 0;
float: left;
font-size: 11px;
padding: 0;
+ margin: 4px 5px 0px 5px;
+ vertical-align:baseline;
.gallery-image {
position: absolute;
.gallery-image {
position: absolute;
right: 0;
bottom: 0;
left: 0;
right: 0;
bottom: 0;
left: 0;
});
$('.change-gallery', element).click(function() {
$('.chosen-gallery').val($('#document-meta .gallery').html() || '/platforma/gallery/');
});
$('.change-gallery', element).click(function() {
$('.chosen-gallery').val($('#document-meta .gallery').html() || '/platforma/gallery/');
- $('.gallery-image').animate({top: 53}, 200);
+ $('.gallery-image').animate({top: 60}, 200);
$('.chosen-gallery').focus();
});
$('.change-gallery-ok', element).click(function() {
$('.chosen-gallery').focus();
});
$('.change-gallery-ok', element).click(function() {
}
$('#document-meta .gallery').html($('.chosen-gallery').val());
updateGallery($('.chosen-gallery').val());
}
$('#document-meta .gallery').html($('.chosen-gallery').val());
updateGallery($('.chosen-gallery').val());
- $('.gallery-image').animate({top: 27}, 200);
+ $('.gallery-image').animate({top: 30}, 200);
});
$('.change-gallery-cancel', element).click(function() {
});
$('.change-gallery-cancel', element).click(function() {
- $('.gallery-image').animate({top: 27}, 200);
+ $('.gallery-image').animate({top: 30}, 200);
});
$('.gallery-image img', element).load(function() {
});
$('.gallery-image img', element).load(function() {
element.data('images', data);
pn.val(1);
pn.change();
element.data('images', data);
pn.val(1);
pn.change();
- $('img', element).show();
+ $('.gallery-image img', element).show();
},
error: function(data) {
element.data('images', []);
pn.val(1);
pn.change();
},
error: function(data) {
element.data('images', []);
pn.val(1);
pn.change();
- $('img', element).hide();
+ $('.gallery-image img', element).hide();
+
+ var ANNOT_ALLOWED = ['wyroznienie'];
+
+ function html2plainText(fragment) {
+ var text = "";
+
+ $(fragment.childNodes).each(function() {
+ if(this.nodeType == 3) // textNode
+ text += this.nodeValue;
+ else if (this.nodeType == 1
+ && $.inArray($(this).attr('x-node'), ANNOT_ALLOWED) != -1 ){
+ text += html2plainText(this);
+ }
+ });
+
+ return text;
+ }
function addAnnotation()
{
function addAnnotation()
{
- var text = range.toString();
+ // BUG #273 - selected text can contain themes, which should be omited from
+ // defining term
+ var text = html2plainText( range.cloneContents() );
+
var tag = $('<span></span>');
range.collapse(false);
range.insertNode(tag[0]);
var tag = $('<span></span>');
range.collapse(false);
range.insertNode(tag[0]);
--find-links=http://stigma.nowoczesnapolska.org.pl/pypi/
--find-links=http://stigma.nowoczesnapolska.org.pl/pypi/
-Django==1.1.1
-lxml>=2.2,<2.3
-mercurial==1.3.1
+Django>=1.1.1,<1.2
+lxml>=2.2
+mercurial>=1.3.1
librarian>=1.3.dev,<1.4
PyYAML>=3.0
librarian>=1.3.dev,<1.4
PyYAML>=3.0
+# MySQL-python>=1.2,<2.0