#!/usr/bin/env python




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from Plugins.Extensions.OpenWebif.controllers.i18n import tstrings

##################################################
## MODULE CONSTANTS
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1644596120.854164
__CHEETAH_genTimestamp__ = 'Fri Feb 11 16:15:20 2022'
__CHEETAH_src__ = '/home/nonsolosat/openpli-dreambox-oe-core/build/tmp/work/dm520-oe-linux/enigma2-plugin-extensions-openwebif/gitAUTOINC+81b15e17ab-r0/git/plugin/controllers/views/ajax/bqe.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Feb 11 15:59:45 2022'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'

if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
    raise AssertionError(
      'This template was compiled with Cheetah version'
      ' %s. Templates compiled before version %s must be recompiled.'%(
         __CHEETAH_version__, RequiredCheetahVersion))

##################################################
## CLASSES

class bqe(Template):

    ##################################################
    ## CHEETAH GENERATED METHODS


    def __init__(self, *args, **KWs):

        super(bqe, self).__init__(*args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
        

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        _orig_filter_34725653 = _filter
        filterName = u'WebSafe'
        if self._CHEETAH__filters.has_key("WebSafe"):
            _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
        else:
            _filter = self._CHEETAH__currentFilter = \
			self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
        write(u'''<style>
.select { width: 100%; }
.sortable { list-style-type: none; margin: 0; padding: 0; width: 200px; }
.sortable li { margin: 0 1px 1px 2px; padding-left: 1.5em; font-size: .8em;  height:20px;}
.sortable li span { margin: 0 0 0 -1.5em; display: inline-block; }
 #bql li .handle, #bqs li .handle { display: inline-block;width: 2em;}
 #bql li span,#bqs li span {font-size: 12px;margin-top: 3px;margin-left: 2px;}

.selectable { list-style-type: none; margin: 0; padding: 0; width: 100%; }
.selectable li { margin: 1px; padding: 0.1em; font-size: 1em; height: 20px; cursor: pointer; background-image:none; }
</style>
<div id="content_container">
\t<div id="content_main" style="min-height: 500px;" class="ui-widget-content">
\t\t<div id="info">
\t\t<h3 class="ui-widget-header">''')
        _v = VFFSL(SL,"tstrings",True)['Bouquet_Editor'] # u"$tstrings['Bouquet_Editor']" on line 17, col 32
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['Bouquet_Editor']")) # from line 17, col 32.
        write(u'''</h3>
\t\t<div style="display: inline-block; width: 100%; zoom: 1;height: 700px;">
\t\t<div style="width:50%; height:50%; float:left">
\t\t<div style="padding:5px;">
\t\t<div id="toolbar-header" class="ui-widget-header">
\t\t\t<span id="tb1">
\t\t\t\t<input type="radio" id="toolbar-choose-tv" name="tb1" checked="checked" /><label for="toolbar-choose-tv">''')
        _v = VFFSL(SL,"tstrings",True)['tv'] # u"$tstrings['tv']" on line 23, col 110
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['tv']")) # from line 23, col 110.
        write(u'''</label>
\t\t\t\t<input type="radio" id="toolbar-choose-radio" name="tb1"/><label for="toolbar-choose-radio">''')
        _v = VFFSL(SL,"tstrings",True)['radio'] # u"$tstrings['radio']" on line 24, col 97
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['radio']")) # from line 24, col 97.
        write(u'''</label>
\t\t\t</span>
\t\t\t<span id="tb2">
\t\t\t\t<input type="radio" id="toolbar-choose-satellites" name="tb2" /><label for="toolbar-choose-satellites">''')
        _v = VFFSL(SL,"tstrings",True)['satellites'] # u"$tstrings['satellites']" on line 27, col 108
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['satellites']")) # from line 27, col 108.
        write(u'''</label>
\t\t\t\t<input type="radio" id="toolbar-choose-providers" name="tb2" checked="checked" /><label for="toolbar-choose-providers">''')
        _v = VFFSL(SL,"tstrings",True)['providers'] # u"$tstrings['providers']" on line 28, col 124
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['providers']")) # from line 28, col 124.
        write(u'''</label>
\t\t\t\t<input type="radio" id="toolbar-choose-channels" name="tb2" /><label for="toolbar-choose-channels">''')
        _v = VFFSL(SL,"tstrings",True)['all_channels'] # u"$tstrings['all_channels']" on line 29, col 104
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['all_channels']")) # from line 29, col 104.
        write(u'''</label>
\t\t\t</span>
\t\t</div>
\t\t<div id="sel0" style="height: 255px;overflow-y:scroll;margin:5px;">
\t\t\t<ol id="provider" class="selectable"></ol>
\t\t</div>
\t\t<div style="margin:5px;">
\t\t\t<button id="btn-provider-add">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_add_provider_as_bouquet'] # u"$tstrings['bqe_add_provider_as_bouquet']" on line 36, col 34
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_add_provider_as_bouquet']")) # from line 36, col 34.
        write(u'''</button>
\t\t</div>
\t\t<div style="margin:5px;">
\t\t\t''')
        _v = VFFSL(SL,"tstrings",True)['bqe_search'] # u"$tstrings['bqe_search']" on line 39, col 4
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_search']")) # from line 39, col 4.
        write(u''': <input id="searchch" value="...">
\t\t</div>
\t\t<div id="sel1" style="height: 300px;overflow-y:scroll;margin:5px;">
\t\t\t<ol id="channels" class="selectable"></ol>
\t\t</div>
\t\t<div style="margin:5px 0 5px 0;">
\t\t\t<button id="btn-channel-add">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_add_channel'] # u"$tstrings['bqe_add_channel']" on line 45, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_add_channel']")) # from line 45, col 33.
        write(u'''</button>
\t\t\t<button id="btn-alternative-add">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_add_alternative'] # u"$tstrings['bqe_add_alternative']" on line 46, col 37
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_add_alternative']")) # from line 46, col 37.
        write(u'''</button>
\t\t</div>
\t\t</div>
\t\t</div>
\t\t<div style="width:50%; height:50%; float:right">
\t\t<div style="padding:5px;">
\t\t<div id="toolbar-header" class="ui-widget-header">
\t\t\t<span id="tb3">
\t\t\t\t<button id="toolbar-bouquets-reload">''')
        _v = VFFSL(SL,"tstrings",True)['reload'] # u"$tstrings['reload']" on line 54, col 42
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['reload']")) # from line 54, col 42.
        write(u'''</button>
\t\t\t\t<button id="toolbar-bouquets-export">''')
        _v = VFFSL(SL,"tstrings",True)['export'] # u"$tstrings['export']" on line 55, col 42
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['export']")) # from line 55, col 42.
        write(u'''</button>
\t\t\t\t<button id="toolbar-bouquets-import">''')
        _v = VFFSL(SL,"tstrings",True)['import'] # u"$tstrings['import']" on line 56, col 42
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['import']")) # from line 56, col 42.
        write(u'''</button>
\t\t\t</span>
\t\t</div>
\t\t<div style="padding:5px;">
\t\t\t<div id="sel2" style="height: 280px;overflow-y:scroll;">
\t\t\t\t<ol id="bql" class="selectable"></ol>
\t\t\t</div>
\t\t\t<div style="margin:5px 0 5px 0;">
\t\t\t\t<button id="btn-bouquet-add">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_add_bq'] # u"$tstrings['bqe_add_bq']" on line 64, col 34
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_add_bq']")) # from line 64, col 34.
        write(u'''</button>
\t\t\t\t<button id="btn-bouquet-rename">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_rename_bq'] # u"$tstrings['bqe_rename_bq']" on line 65, col 37
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_rename_bq']")) # from line 65, col 37.
        write(u'''</button>
\t\t\t\t<button id="btn-bouquet-delete">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_delete_bq'] # u"$tstrings['bqe_delete_bq']" on line 66, col 37
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_delete_bq']")) # from line 66, col 37.
        write(u'''</button>
\t\t\t</div>
\t\t\t<div id="sel3" style="height: 300px;overflow-y:scroll;">
\t\t\t\t<ol id="bqs" class="selectable"></ol>
\t\t\t</div>
\t\t\t<div style="margin:5px 0 5px 0;">
\t\t\t\t<button id="btn-channel-delete">''')
        _v = VFFSL(SL,"tstrings",True)['delete'] # u"$tstrings['delete']" on line 72, col 37
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['delete']")) # from line 72, col 37.
        write(u'''</button>
\t\t\t\t<button id="btn-marker-add">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_add_marker'] # u"$tstrings['bqe_add_marker']" on line 73, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_add_marker']")) # from line 73, col 33.
        write(u'''</button>
\t\t\t\t<button id="btn-spacer-add">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_add_spacer'] # u"$tstrings['bqe_add_spacer']" on line 74, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_add_spacer']")) # from line 74, col 33.
        write(u'''</button>
\t\t\t\t<button id="btn-marker-group-rename">''')
        _v = VFFSL(SL,"tstrings",True)['bqe_rename'] # u"$tstrings['bqe_rename']" on line 75, col 42
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bqe_rename']")) # from line 75, col 42.
        write(u'''</button>
\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t\t</div>
\t\t</div>
\t\t<br clear="all">
\t\t<div id="statuscont" style="display:none">
\t\t\t<div id="statusbox" class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
\t\t\t\t<p>
\t\t\t\t\t<span id="statusicon" class="ui-icon ui-icon-alert" style="margin-right: .3em;"></span> 
\t\t\t\t\t<span id="statustext"></span>
\t\t\t\t</p>
\t\t\t</div>
\t\t</div>
\t</div>
\t<form id="uploadrestore" style="display:none" action"uploadrestore"="" method="post" enctype="multipart/form-data" encoding="multipart/form-data">
\t<input type="file" name="rfile" id="rfile">
\t</form>
</div>
<script src="js/bqe.min.js?v2.9"></script>
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_34725653
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    _mainCheetahMethod_for_bqe= 'respond'

## END CLASS DEFINITION

if not hasattr(bqe, '_initCheetahAttributes'):
    templateAPIClass = getattr(bqe, '_CHEETAH_templateClass', Template)
    templateAPIClass._addCheetahPlumbingCodeToClass(bqe)


# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/

##################################################
## if run from command line:
if __name__ == '__main__':
    from Cheetah.TemplateCmdLineIface import CmdLineIface
    CmdLineIface(templateObj=bqe()).run()


