Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98687038
webaccount_index.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jan 15, 15:36
Size
3 KB
Mime Type
text/html
Expires
Fri, Jan 17, 15:36 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
23618353
Attached To
R3600 invenio-infoscience
webaccount_index.html
View Options
{#
## This file is part of Invenio.
## Copyright (C) 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#}
{% from "_formhelpers.html" import render_field with context %}
{% extends "page.html" %}
{% set title = _('Your Account') %}
{% block title %}
<div class="page-header">
<h1>{{ title }}
<small class="clearfix">
<div class="pull-right">
<input placeholder="{{ _('Filter widgets') }}"
type="text"
name="widget"
autofocus />
</div>
</small>
</h1>
</div>
{% endblock %}
{% block body %}
{% css "img/jquery-ui/themes/redmond/jquery-ui.css" %}
{% js "js/jquery-ui.min.js" %}
<div class="container">
<div class="row">
<div class="span12">
<ul id="widgets" class="thumbnails">
{%- for p in plugins if p.widget -%}
<li id="{{ p.__class__.__name__}}" class="widget span{{ p.widget.size }}">
<div class="thumbnail">
<div class="caption">
<h4>
{%- if p.icon -%}
<small><i
style="margin-top: 0px;"
class="icon-{{ p.icon|safe }}"></i>
</small>
{%- endif -%}
{%- if p.view -%}
<a class=""
href="{{ p.view|safe }}">{{ p.title|safe }}</a>
{%- else -%}
{{ p.title|safe }}
{%- endif -%}
<small>
{%- if p.edit -%}
<a class="edit" href="{{ p.edit|safe }}"><i class="icon-wrench"></i></a>
{%- endif -%}
<button type="button" class="close"> ×</button>
</small>
</h4>
<div style="
overflow: hidden;
width: 90%;
height: 80px;
text-overflow: ellipsis;">
{{ p.widget()|safe }}
</div>
</div>
</div>
</li>
{%- endfor -%}
</ul>
</div>
</div>
</div>
<style>
#widgets li .thumbnail {
background: white;
}
#widgets li.ui-sortable-placeholder {
background: #CCC;
height: 120px;
display: block;
float: left;
visibility: visible!important;
}
</style>
{% endblock %}
{% block javascript %}
<script>
$(function() {
$('input[name=widget]').keyup(function(e) {
var filter = $(this).val()
if (filter.length > 0 && e.keyCode === 13) {
var l = $('#widgets li:visible').find('a.edit').first().attr('href')
if (l.length > 0) {
window.location.href = l
}
return false
}
$('#widgets li').each(function(i, li) {
if ($(li).find('.caption').text().indexOf(filter) > -1 || filter == '') {
$(this).show()
} else {
$(this).hide()
}
})
})
$("#widgets li").each(function() {
var $e = $(this)
$e.find('.close').on('click', function() {
$e.hide()
})
})
$( "#widgets" ).sortable({
update: function(event, ui) {
var newOrder = $(this).sortable('toArray');
$.ajax({
url: '{{ url_for('webaccount.edit', name='dashboard_user_settings') }}'
, type: 'POST'
, data: $.param({
order: newOrder
}, true)
});
}
});
$( "#widgets" ).disableSelection();
});
</script>
{% endblock %}
Event Timeline
Log In to Comment