mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Search: move search and search_invenio to webpack
This commit is contained in:
parent
d60e58b44f
commit
23373984ec
@ -15,6 +15,8 @@
|
||||
* along with Indico; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import './main.css';
|
||||
|
||||
(function() {
|
||||
var $t = $T.domain('importer');
|
||||
|
||||
@ -35,8 +35,8 @@ class ImporterPlugin(IndicoPlugin):
|
||||
|
||||
def init(self):
|
||||
super(ImporterPlugin, self).init()
|
||||
self.inject_js('importer_js', WPManageTimetable)
|
||||
self.inject_css('importer_css', WPManageTimetable)
|
||||
self.inject_bundle('main.js', WPManageTimetable)
|
||||
self.inject_bundle('main.css', WPManageTimetable)
|
||||
self.connect(signals.event.timetable_buttons, self.get_timetable_buttons)
|
||||
self.importer_engines = {}
|
||||
|
||||
@ -59,10 +59,6 @@ class ImporterPlugin(IndicoPlugin):
|
||||
'.create_subcontrib_reference_rest'),
|
||||
'add_link': url_rule_to_js('attachments.add_link')}}
|
||||
|
||||
def register_assets(self):
|
||||
self.register_js_bundle('importer_js', 'js/importer.js')
|
||||
self.register_css_bundle('importer_css', 'css/importer.css')
|
||||
|
||||
def register_importer_engine(self, importer_engine, plugin):
|
||||
self.importer_engines[importer_engine._id] = (importer_engine, plugin)
|
||||
|
||||
|
||||
5
importer/webpack-bundles.json
Normal file
5
importer/webpack-bundles.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"entry": {
|
||||
"main": "./index.js"
|
||||
}
|
||||
}
|
||||
@ -15,6 +15,8 @@
|
||||
* along with Indico; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import './main.scss';
|
||||
|
||||
(function(global) {
|
||||
var $t = $T.domain('search');
|
||||
|
||||
@ -39,12 +39,8 @@ class SearchPlugin(IndicoPlugin):
|
||||
self.connect(plugins_loaded, self._plugins_loaded, sender=self.app)
|
||||
self.template_hook('conference-header-right-column', self._add_conference_search_box)
|
||||
self.template_hook('page-header', self._add_category_search_box)
|
||||
self.inject_js('search_js')
|
||||
self.inject_css('search_css')
|
||||
|
||||
def register_assets(self):
|
||||
self.register_js_bundle('search_js', 'js/search.js')
|
||||
self.register_css_bundle('search_css', 'css/search.scss')
|
||||
self.inject_bundle('main.js')
|
||||
self.inject_bundle('main.css')
|
||||
|
||||
def _plugins_loaded(self, sender, **kwargs):
|
||||
if not self.engine_plugin:
|
||||
|
||||
5
search/webpack-bundles.json
Normal file
5
search/webpack-bundles.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"entry": {
|
||||
"main": "./index.js"
|
||||
}
|
||||
}
|
||||
@ -15,6 +15,8 @@
|
||||
* along with Indico; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import './main.scss';
|
||||
|
||||
(function(global) {
|
||||
'use strict';
|
||||
|
||||
@ -57,12 +57,8 @@ class InvenioSearchPlugin(SearchPluginBase):
|
||||
def init(self):
|
||||
super(InvenioSearchPlugin, self).init()
|
||||
for wp in (WPSearchCategory, WPSearchConference):
|
||||
self.inject_css('search_invenio_css', wp)
|
||||
self.inject_js('search_invenio_js', wp)
|
||||
|
||||
def register_assets(self):
|
||||
self.register_css_bundle('search_invenio_css', 'css/search_invenio.scss')
|
||||
self.register_js_bundle('search_invenio_js', 'js/search_invenio.js')
|
||||
self.inject_bundle('main.js', wp)
|
||||
self.inject_bundle('main.css', wp)
|
||||
|
||||
def get_blueprints(self):
|
||||
return IndicoPluginBlueprint('search_invenio', 'indico_search_invenio')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user