from invenio_base.bundles import invenio as _i
from invenio_base.bundles import jquery as _j

from invenio_ext.assets import Bundle, RequireJSFilter
from invenio_ext.assets.filter import CSSUrlFixer

js = Bundle("vendors/plupload/js/moxie.js",
            "vendors/plupload/js/plupload.dev.js",
            "vendors/json-editor/dist/jsoneditor.js",
            "js/deposit/init.js",
            "js/deposit/jsonwidget.js",
            output="deposit.js",
            filters=RequireJSFilter(exclude=[_j, _i]),
            weight=51,
            bower={
                "plupload": "latest",
                "ckeditor": "latest",
                "flight": "latest",
                "eonasdan-bootstrap-datetimepicker": "4.14.30",
                "base-64": "latest",
                "json-editor": "latest",
                "select2": "~3",
                "utf8": "latest",
            })

styles = Bundle(
    "css/deposit/form.css",
    "vendors/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css",  # noqa
    Bundle(
        "less/deposit/jsonwidget.less",
        Bundle("vendors/select2/select2.css",
Пример #2
0
# Copyright (C) 2014, 2015 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.
"""Records bundles."""

from __future__ import unicode_literals

from invenio_ext.assets import Bundle, RequireJSFilter

js = Bundle("js/records/init.js",
            filters=RequireJSFilter(),
            output="records.js",
            weight=20)

css = Bundle("css/records/record.css",
             output="record.css",
             weight=20,
             filters="cleancss")
Пример #3
0
#
# 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.
"""Bundles for Jasmine test runner."""

from __future__ import unicode_literals

from invenio_base.bundles import invenio as _i
from invenio_base.bundles import jquery as _j
from invenio_ext.assets import Bundle, RequireJSFilter

jasmine_js = Bundle(
    # es5-shim is needed by PhantomJS
    # 'vendors/es5-shim/es5-shim.js',
    # 'vendors/es5-shim/es5-sham.js',
    "js/jasmine/init.js",
    output="jasmine.js",
    weight=50,
    filters=RequireJSFilter(exclude=[_j, _i]),
    bower={
        "jasmine": ">=2",
        "jasmine-jquery": ">=2",
        "jasmine-flight": ">=3",
        "jasmine-ajax": ">=2",
    })

jasmine_styles = Bundle('vendors/jasmine/lib/jasmine-core/jasmine.css',
                        weight=-1,
                        output='jasmine.css')
Пример #4
0
# 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.
"""Search bundles."""

from __future__ import unicode_literals

from invenio_base.bundles import invenio as _i, jquery as _j
from invenio_ext.assets import Bundle, RequireJSFilter

js = Bundle('js/search/init.js',
            filters=RequireJSFilter(exclude=[_j, _i]),
            output="search.js",
            weight=50,
            bower={
                "flight": "latest",
            })

styles = Bundle('css/search/collection.css',
                'css/search/search.css',
                'css/search/searchbar.css',
                filters="cleancss",
                output="search.css",
                weight=60)

adminjs = Bundle('js/admin/search/init.js',
                 filters=RequireJSFilter(exclude=[_j, _i]),
                 output="admin/search.js",
                 weight=50,
# 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.
"""Accounts bundles."""

from __future__ import unicode_literals

from invenio_base.bundles import invenio as _i
from invenio_base.bundles import jquery as _j
from invenio_base.bundles import styles as _styles
from invenio_ext.assets import Bundle, RequireJSFilter

# The underscore makes it "hidden" for the bundle collector.
_styles.contents += ("css/accounts/login.css", )

js = Bundle("js/accounts/init.js",
            output="accounts.js",
            weight=80,
            filters=RequireJSFilter(exclude=[_j, _i]),
            bower={"jquery-ui": "~1.11"})
#
# 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.
"""Comments bundles."""

from __future__ import unicode_literals

from invenio_ext.assets import Bundle

js = Bundle('js/comments/comments.js',
            'js/comments/collapse.js',
            output='comments.js',
            weight=10,
            filters='uglifyjs')

css = Bundle('css/comments/comments.css',
             output='comments.css',
             weight=10,
             filters='cleancss')
Пример #7
0
import mimetypes

from flask import current_app

from invenio_ext.assets import Bundle, RequireJSFilter

mimetypes.add_type("text/css", ".less")

styles = Bundle("vendors/jquery-tokeninput/styles/token-input.css",
                "vendors/jquery-tokeninput/styles/token-input-facebook.css",
                "vendors/typeahead.js-bootstrap3.less/typeahead.css",
                "less/base.less",
                "less/user-menu.less",
                "less/sticky-footer.less",
                "less/footer.less",
                output="invenio.css",
                depends=["less/base.less", "less/base/**/*.less"],
                filters="less,cleancss",
                weight=50,
                bower={
                    "bootstrap": "3.3.4",
                    "font-awesome": "4.1.0",
                    "typeahead.js-bootstrap3.less": "0.2.3",
                })

jquery = Bundle(
    "js/init.js",
    output="jquery.js",
    filters="requirejs",
    weight=10,
    bower={
        # The dependencies marked as *orphan* are not part of any bundles
Пример #8
0
# 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.

"""Formatter bundles."""

from __future__ import unicode_literals

from invenio_ext.assets import Bundle


css = Bundle(
    "css/formatter/templates_brief.css",
    "css/formatter/templates_detailed.css",
    output="formatter.css",
    weight=60,
    filters="cleancss",
    bower={
        # Used by Video_HTML_detailed.
        "mediaelement": "latest",
        # 1.4.0 is from 2011 !!!
        # ----------------------
        # http://www.keith-wood.name/bookmark.html
        "jquery.bookmark": "http://invenio-software.org/download/jquery/"
                           "jquery.bookmark.package-1.4.0.zip"  # orphan
    }
)
Пример #9
0
# 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.
"""Checker bundles."""

from __future__ import unicode_literals

from invenio_base.bundles import invenio as _i, jquery as _j
from invenio_ext.assets import Bundle, CleanCSSFilter, RequireJSFilter

js = Bundle('js/checker/admin/init.js',
            filters=RequireJSFilter(exclude=[_j, _i]),
            output='checker_task_view.js',
            weight=30,
            bower={
                "jquery": "latest",
                "bootstrap-datepicker-eyecon": "latest",
                "watable": "https://github.com/wootapa/watable.git#44856312ea",
                "flight": "latest",
                "jqcron": "https://github.com/arnapou/jqcron.git",
            })

css = Bundle('vendors/bootstrap/dist/css/bootstrap.css',
             'vendors/bootstrap-datepicker-eyecon/css/datepicker.css',
             'vendors/watable/watable.css',
             'css/checker/admin/style.css',
             'vendors/jqcron/src/jqCron.css',
             filters=CleanCSSFilter(),
             output='checker.css',
             weight=30,
             bower={