Added files in FIBRE
authorLoic & Edelberto <loic.baron@lip6.fr>
Wed, 23 Apr 2014 13:42:41 +0000 (10:42 -0300)
committerLoic & Edelberto <loic.baron@lip6.fr>
Wed, 23 Apr 2014 13:42:41 +0000 (10:42 -0300)
140 files changed:
auth/manifoldbackend-130314.py [new file with mode: 0644]
auth/manifoldbackend.py.original [new file with mode: 0644]
myslice/theme.py [new file with mode: 0644]
old.unfold.sqlite3-110314 [new file with mode: 0644]
plugins/cafe-1.0/edelberto-140314.py [new file with mode: 0644]
plugins/columns_editor/__init__.py [new file with mode: 0644]
plugins/columns_editor/static/css/query_editor.css [new file with mode: 0644]
plugins/columns_editor/static/img/details_close.png [new file with mode: 0644]
plugins/columns_editor/static/img/myslice-icon-filter.png [new file with mode: 0644]
plugins/columns_editor/static/js/columns_editor.js [new file with mode: 0644]
plugins/columns_editor/templates/columns_editor.html [new file with mode: 0644]
plugins/columns_editor/templates/filter_input_integer.html [new file with mode: 0644]
plugins/columns_editor/templates/filter_input_others.html [new file with mode: 0644]
plugins/columns_editor/templates/filter_input_string.html [new file with mode: 0644]
plugins/columns_editor/templates/filter_input_string_values.html [new file with mode: 0644]
plugins/scheduler2/__init__.py [new file with mode: 0755]
plugins/scheduler2/static/css/scheduler2.css [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png [new file with mode: 0755]
plugins/scheduler2/static/css/slider/jquery-ui-1.10.3.slider.min.css [new file with mode: 0755]
plugins/scheduler2/static/img/closed-lock-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/closed-lock.png [new file with mode: 0755]
plugins/scheduler2/static/img/loading-7b6dc55620a355b55b835f6b4c300f9b.gif [new file with mode: 0755]
plugins/scheduler2/static/img/loading.gif [new file with mode: 0755]
plugins/scheduler2/static/img/nitos_topo.png [new file with mode: 0755]
plugins/scheduler2/static/img/opened-lock-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/opened-lock.png [new file with mode: 0755]
plugins/scheduler2/static/img/podcast-15-w.png [new file with mode: 0755]
plugins/scheduler2/static/img/podcast-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/podcast.png [new file with mode: 0755]
plugins/scheduler2/static/img/pushpin-1.png [new file with mode: 0755]
plugins/scheduler2/static/img/tools-15.png [new file with mode: 0755]
plugins/scheduler2/static/img/tools.png [new file with mode: 0755]
plugins/scheduler2/static/js/angular/angular.min.js [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler-SchedulerCtrl.js [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler-helpers.js [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler-table-selector.js [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler2.js [new file with mode: 0755]
plugins/scheduler2/static/js/scheduler2_old.js [new file with mode: 0755]
plugins/scheduler2/static/js/selectRangeWorker.js [new file with mode: 0755]
plugins/scheduler2/static/js/slider/jquery-ui-1.10.3.slider.min.js [new file with mode: 0755]
plugins/scheduler2/templates/scheduler.html [new file with mode: 0755]
plugins/testbeds/__init__.py [new file with mode: 0644]
plugins/testbeds/static/css/myplugin.css [new file with mode: 0644]
plugins/testbeds/static/js/testbeds.js [new file with mode: 0644]
plugins/testbeds/templates/testbeds.html [new file with mode: 0644]
portal/newsview.py [new file with mode: 0644]
portal/slicetabusers.py [new file with mode: 0644]
portal/static/css/fantaastic.css [new file with mode: 0644]
portal/static/img/fantaastic-s.png [new file with mode: 0644]
portal/static/img/favicon.ico [new file with mode: 0644]
portal/static/img/fibre/br.png [new file with mode: 0644]
portal/static/img/fibre/cafe.jpg [new file with mode: 0644]
portal/static/img/fibre/eu.png [new file with mode: 0644]
portal/static/img/icon_authority_color.png~HEAD [new file with mode: 0644]
portal/static/img/icon_slices.png~HEAD [new file with mode: 0644]
portal/static/img/icon_support.png~HEAD [new file with mode: 0644]
portal/static/img/icon_testbed_color.png~HEAD [new file with mode: 0644]
portal/static/img/icon_user_color.png~HEAD [new file with mode: 0644]
portal/static/img/ict_logo-s.png [new file with mode: 0644]
portal/static/img/institutions/fed4fire.iminds.gif [new file with mode: 0644]
portal/static/img/institutions/fed4fire.upmc.gif [new file with mode: 0644]
portal/static/img/nepi_logo.png [new file with mode: 0644]
portal/static/img/omf-logo.png [new file with mode: 0644]
portal/static/img/terminal_icon.png [new file with mode: 0644]
portal/templates/_widget-login-manager.html [new file with mode: 0644]
portal/templates/_widget-login-user.html [new file with mode: 0644]
portal/templates/_widget-news.html [new file with mode: 0644]
portal/templates/_widget-slice-sections.html [new file with mode: 0644]
portal/templates/_widget-topmenu.html [new file with mode: 0644]
portal/templates/base.html [new file with mode: 0644]
portal/templates/fantaastic/fantaastic_widget-topmenu.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_base.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_contact.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_supportview.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_widget-slice-sections.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_widget-topmenu.html [new file with mode: 0644]
portal/templates/fibre/.fibre__widget-login-fed-manager.html.swp [new file with mode: 0644]
portal/templates/fibre/fibre__widget-login-fed-manager.html [new file with mode: 0644]
portal/templates/fibre/fibre_about.html [new file with mode: 0644]
portal/templates/fibre/fibre_institution.html [new file with mode: 0644]
portal/templates/fibre/fibre_slice-request-ack-view.html [new file with mode: 0644]
portal/templates/fibre/fibre_slice-request-done-view.html [new file with mode: 0644]
portal/templates/fibre/fibre_supportview.html [new file with mode: 0644]
portal/templates/fibre/fibre_user_register_complete.html [new file with mode: 0644]
portal/templates/fibre/old/fibre_slice-resource-view.html [new file with mode: 0644]
portal/templates/fibre/old/fibre_slice-user-view.html [new file with mode: 0644]
portal/templates/fibre/old/fibre_slice-view.html [new file with mode: 0644]
portal/templates/fibre/old/fibre_widget-slice-sections.html [new file with mode: 0644]
portal/templates/fibre/onelab__widget-login-manager.html [new file with mode: 0644]
portal/templates/fibre/onelab__widget-login-user.html [new file with mode: 0644]
portal/templates/fibre/onelab__widget-topmenu.html [new file with mode: 0644]
portal/templates/fibre/onelab_home-view.html [new file with mode: 0644]
portal/templates/institution-tab-info.html [new file with mode: 0644]
portal/templates/news.html [new file with mode: 0644]
portal/templates/onelab/onelab_base.html [new file with mode: 0644]
portal/templates/onelab/onelab_institution.html [new file with mode: 0644]
portal/templates/onelab/onelab_news.html [new file with mode: 0644]
portal/templates/onelab/onelab_widget-news.html [new file with mode: 0644]
portal/templates/onelab/onelab_widget-topmenu.html [new file with mode: 0644]
portal/templates/slice-resource-view.html [new file with mode: 0644]
portal/templates/slice-tab-experiment.html [new file with mode: 0644]
portal/templates/slice-tab-users-view.html [new file with mode: 0644]
portal/templates/slice-view.html [new file with mode: 0644]
portal/templatetags/__init__.py [new file with mode: 0644]
portal/templatetags/portal_filters.py [new file with mode: 0644]
third-party/jquery-ui-slider [new symlink]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_flat_0_aaaaaa_40x100.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_55_fbf9ee_1x400.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_65_ffffff_1x400.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_dadada_1x400.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_e6e6e6_1x400.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_ffffff_1x400.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_222222_256x240.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_2e83ff_256x240.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_454545_256x240.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_888888_256x240.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_f6cf3b_256x240.png [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/css/jquery-ui-1.10.3.slider.min.css [new file with mode: 0755]
third-party/jquery-ui-slider-1.10.3/js/jquery-ui-1.10.3.slider.min.js [new file with mode: 0755]
ui/templates/base2.html [new file with mode: 0644]
unfold.sqlite3-110314 [new file with mode: 0644]
unfold.sqlite3-130314 [new file with mode: 0644]
unfold.sqlite3-140314 [new file with mode: 0644]
unfold.sqlite3.old-120314 [new file with mode: 0644]

diff --git a/auth/manifoldbackend-130314.py b/auth/manifoldbackend-130314.py
new file mode 100644 (file)
index 0000000..ee80113
--- /dev/null
@@ -0,0 +1,228 @@
+import time
+
+# import ldap for LDAP authentication - Edelberto
+import ldap
+
+from django.contrib.auth.models import User
+
+from manifoldapi.manifoldapi    import ManifoldAPI, ManifoldException, ManifoldResult
+from manifold.core.query        import Query
+
+# Name my backend 'ManifoldBackend'
+class ManifoldBackend:
+
+
+    # Create an authentication method
+    # This is called by the standard Django login procedure
+    def authenticate(self, token=None):
+    
+        # LDAP local/global var
+        checkldap = None
+
+        if not token:
+            return None
+
+        try:
+            #usernameldap is from LDAP user form. If it is filled - See portal/homeview.py too
+            usernameldap = token['usernameldap']
+            username = token['username']
+            password = token['password']
+            request = token['request']
+
+            # if data are not from LDAP form then normal (local) login
+            if not usernameldap:
+                auth = {'AuthMethod': 'password', 'Username': username, 'AuthString': password}
+                api = ManifoldAPI(auth)
+                sessions_result = api.forward(Query.create('local:session').to_dict())
+                print "result"
+                sessions = sessions_result.ok_value()
+                print "ok"
+                if not sessions:
+                    print "GetSession failed", sessions_result.error()
+                    return
+                print "first", sessions
+                session = sessions[0]
+
+                # Change to session authentication
+                api.auth = {'AuthMethod': 'session', 'session': session['session']}
+                self.api = api
+
+                # Get account details
+                # the new API would expect Get('local:user') instead
+                persons_result = api.forward(Query.get('local:user').to_dict())
+                persons = persons_result.ok_value()
+                if not persons:
+                    print "GetPersons failed",persons_result.error()
+                    return
+                person = persons[0]
+                print "PERSON=", person
+
+                request.session['manifold'] = {'auth': api.auth, 'person': person, 'expires': session['expires']}
+            ################################
+            # Edelberto LDAP authentication
+            # if data are from LDAP form, so
+            else:
+            # XXX UGLY
+            # Needing to create an specific entries at settings.py (or myslice.ini) for these vars
+            ##################################################
+            # Edelberto - UFF - esilva@ic.uff.br
+            # v1 - ldap authentication module
+            # Note: focus on LDAP FIBRE-BR for DN
+            #       if uses other DN, configuration are needed
+            ###################################################
+            #Searching an LDAP Directory
+
+                try:
+                    #uid = "debora@uff.br"
+
+                    # Receiving an email address, how can we split and mount it in DN format?
+                    #mail = "debora@uff.br"
+                    mail = usernameldap
+                    login = mail.split('@')[0]
+                    org = mail.split('@')[1]
+                    o = org.split('.')[0]
+                    dc = org.split('.')[1]
+                    '''
+                    print mail
+                    print login
+                    print org
+                    print o
+                    print dc
+                    '''
+
+                    # DN format to authenticate - IMPORTANT!
+                    #FIBRE-BR format
+                    uid = "uid="+mail+",ou=people,o="+o+",dc="+dc
+                    #uid = "uid=debora@uff.br,ou=people,o=uff,dc=br"
+                    # User password from LDAP form
+                    #userPassword = "fibre"
+                    userPassword = password
+
+                    # testing with:
+                    # wrong password for test
+                    #    userPassword = "fibre2"
+                    
+                    # Parameters to connect on LDAP
+                    ldap.set_option(ldap.OPT_REFERRALS, 0)
+                    # LDAP Server Address
+                    l = ldap.open("127.0.0.1")
+                    # LDAP version
+                    l.protocol_version = ldap.VERSION3
+
+                    #l.simple_bind(uid, userPassword)
+                    # l.bind_s is necessary to do the authentication with a normal LDAP user
+                    l.bind_s(uid, userPassword, ldap.AUTH_SIMPLE)
+                    #print l.bind_s(uid, userPassword, ldap.AUTH_SIMPLE)
+
+                    # DN base - Our root dc (dc=br)
+                    baseDN="dc="+dc
+                    searchScope = ldap.SCOPE_SUBTREE
+                    retrieveAttributes = None
+                    # User only can see its credentials. He search only his attributes
+                    searchFilter = "uid="+mail
+
+                    # Getting all attributes
+                    try:
+                        ldap_result_id = l.search(baseDN, searchScope, searchFilter, retrieveAttributes)
+                        result_set = []
+                        # while exist attributes, save them in a list!
+                        while 1:
+                        #   print l.result(ldap_result_id, 0)
+                            result_type, result_data = l.result(ldap_result_id, 0)
+                            if (result_data == []):
+                            #print ("User %s don't allowed to bind in LDAP", uid)
+                                break
+                            else:
+                                ## Appendng to a list
+                                if result_type == ldap.RES_SEARCH_ENTRY:
+                                    result_set.append(result_data)
+                                    #    print result_set
+                    except ldap.LDAPError, e:
+                        print e
+
+                    # Matching if the user is really who his say
+                    #checkldap = None
+                    if l.compare_s(uid, 'uid', mail):
+                        # DEBUG
+                        checkldap = True
+                        print "match"
+
+                # Now, based on default Manifold Auth
+                        auth = {'AuthMethod': 'password', 'Username': usernameldap, 'AuthString': password}
+                        api = ManifoldAPI(auth)
+                        sessions_result = api.forward(Query.create('local:session').to_dict())
+                        print "result"
+                        sessions = sessions_result.ok_value()
+                        print "ok"
+                        if not sessions:
+                            print "GetSession failed", sessions_result.error()
+                            return
+                        print "first", sessions
+                        session = sessions[0]
+
+                        # Change to session authentication
+                        api.auth = {'AuthMethod': 'session', 'session': session['session']}
+                        self.api = api
+
+                        # Get account details
+                        # the new API would expect Get('local:user') instead
+                        persons_result = api.forward(Query.get('local:user').to_dict())
+                        persons = persons_result.ok_value()
+                        if not persons:
+                            print "GetPersons failed",persons_result.error()
+                            return
+                        person = persons[0]
+                        print "PERSON=", person
+
+                        request.session['manifold'] = {'auth': api.auth, 'person': person, 'expires': session['expires']}
+
+                    else:
+                        print "no match. User doesnt allowed"
+                        checkldap = False
+
+                except ldap.LDAPError, e:
+                    print "E: LDAP Search user", e                      
+        # end of LDAP
+       
+        # Follow the same of Manifold 
+        except ManifoldException, e:
+            print "ManifoldBackend.authenticate caught ManifoldException, returning corresponding ManifoldResult"
+            return e.manifold_result
+        except Exception, e:
+            print "E: manifoldbackend", e
+            import traceback
+            traceback.print_exc()
+            return None
+    
+        if not usernameldap:
+            try:
+                # Check if the user exists in Django's local database
+               user = User.objects.get(username=username)
+            except User.DoesNotExist:
+                # Create a user in Django's local database
+                user = User.objects.create_user(username, usernamep, 'passworddoesntmatter')
+                user.first_name = "DUMMY_FIRST_NAME" #person['first_name']
+                user.last_name = "DUMMY LAST NAME" # person['last_name']
+                user.email = person['email']
+            return user
+        else:
+            if checkldap:
+                try:
+                    # Check if the user exists in Django's local database
+                    user = User.objects.get(username=usernameldap)
+                except User.DoesNotExist:
+                    # Create a user in Django's local database
+                    user = User.objects.create_user(username, usernameldap, 'passworddoesntmatter')
+                    user.first_name = "DUMMY_FIRST_NAME" #person['first_name']
+                    user.last_name = "DUMMY LAST NAME" # person['last_name']
+                    user.email = person['email']
+                return user
+
+    # Required for your backend to work properly - unchanged in most scenarios
+    def get_user(self, user_id):
+        try:
+            return User.objects.get(pk=user_id)
+        except User.DoesNotExist:
+            return None
+
+
diff --git a/auth/manifoldbackend.py.original b/auth/manifoldbackend.py.original
new file mode 100644 (file)
index 0000000..eb87ab8
--- /dev/null
@@ -0,0 +1,76 @@
+import time
+
+from django.contrib.auth.models import User
+
+from manifoldapi.manifoldapi    import ManifoldAPI, ManifoldException, ManifoldResult
+from manifold.core.query        import Query
+
+# Name my backend 'ManifoldBackend'
+class ManifoldBackend:
+
+    # Create an authentication method
+    # This is called by the standard Django login procedure
+    def authenticate(self, token=None):
+        if not token:
+            return None
+
+        try:
+            username = token['username']
+            password = token['password']
+            request = token['request']
+
+            auth = {'AuthMethod': 'password', 'Username': username, 'AuthString': password}
+            api = ManifoldAPI(auth)
+            sessions_result = api.forward(Query.create('local:session').to_dict())
+            print "result"
+            sessions = sessions_result.ok_value()
+            print "ok"
+            if not sessions:
+                print "GetSession failed", sessions_result.error()
+                return
+            print "first", sessions
+            session = sessions[0]
+
+            # Change to session authentication
+            api.auth = {'AuthMethod': 'session', 'session': session['session']}
+            self.api = api
+
+            # Get account details
+            # the new API would expect Get('local:user') instead
+            persons_result = api.forward(Query.get('local:user').to_dict())
+            persons = persons_result.ok_value()
+            if not persons:
+                print "GetPersons failed",persons_result.error()
+                return
+            person = persons[0]
+            print "PERSON=", person
+
+            request.session['manifold'] = {'auth': api.auth, 'person': person, 'expires': session['expires']}
+        except ManifoldException, e:
+            print "ManifoldBackend.authenticate caught ManifoldException, returning corresponding ManifoldResult"
+            return e.manifold_result
+        except Exception, e:
+            print "E: manifoldbackend", e
+            import traceback
+            traceback.print_exc()
+            return None
+
+        try:
+            # Check if the user exists in Django's local database
+            user = User.objects.get(username=username)
+        except User.DoesNotExist:
+            # Create a user in Django's local database
+            user = User.objects.create_user(username, username, 'passworddoesntmatter')
+            user.first_name = "DUMMY_FIRST_NAME" #person['first_name']
+            user.last_name = "DUMMY LAST NAME" # person['last_name']
+            user.email = person['email']
+        return user
+
+    # Required for your backend to work properly - unchanged in most scenarios
+    def get_user(self, user_id):
+        try:
+            return User.objects.get(pk=user_id)
+        except User.DoesNotExist:
+            return None
+
+
diff --git a/myslice/theme.py b/myslice/theme.py
new file mode 100644 (file)
index 0000000..d44b854
--- /dev/null
@@ -0,0 +1,26 @@
+import os
+from myslice.configengine import ConfigEngine
+from myslice.settings import TEMPLATE_DIRS
+
+class ThemeView (object):
+    
+    @property
+    def theme(self):
+        self.config = ConfigEngine()
+        if self.config.myslice.theme :
+            return self.config.myslice.theme
+    
+    @property
+    def template(self):
+        # Load a template from the theme directory if it exists
+        # else load it from the common templates dir
+        print "THEME = ",self.theme
+        print "TEMPLATE = ",self.template_name
+        print "TEMPLATE_DIRS = ",TEMPLATE_DIRS
+        filename = self.theme + '_' + self.template_name
+        print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS)
+        print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS)
+        if any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS):
+            return filename
+        else:
+            return self.template_name
diff --git a/old.unfold.sqlite3-110314 b/old.unfold.sqlite3-110314
new file mode 100644 (file)
index 0000000..7c680de
Binary files /dev/null and b/old.unfold.sqlite3-110314 differ
diff --git a/plugins/cafe-1.0/edelberto-140314.py b/plugins/cafe-1.0/edelberto-140314.py
new file mode 100644 (file)
index 0000000..dc07b37
--- /dev/null
@@ -0,0 +1,211 @@
+#!/usr/bin/env python
+
+from portal.models              import PendingUser
+#from portal.actions             import create_pending_user
+# Edelberto - LDAP
+from portal.actions             import create_pending_user, ldap_create_user
+
+#Edelberto from manifoldauth
+import os,sys
+import subprocess
+import shlex
+import getpass
+from hashlib import md5
+import time
+from random import randint
+import crypt
+
+import re
+#from manifold.manifold.core.router import Router
+from manifold.core.query                import Query
+from manifoldapi.manifoldapi               import execute_admin_query, execute_query
+#from portal.actions                     import manifold_add_user, manifold_add_account, manifold_update_account
+from portal.actions                     import manifold_add_account, manifold_add_reference_user_accounts, sfa_create_user, create_pending_user
+from manifold.core.query import Query
+# add user to manifold
+
+from unfold.loginrequired   import FreeAccessView
+
+from portal.models      import  PendingUser
+
+from django.views.generic import View
+from django.core.context_processors import csrf
+from django.contrib.auth import authenticate, login, logout
+from django.template import RequestContext
+from django.shortcuts import render_to_response
+
+from manifoldapi.manifoldresult import ManifoldResult
+from ui.topmenu import topmenu_items, the_user
+from myslice.configengine import ConfigEngine
+
+#from django.http import HttpResponse HttpResponseRedirect
+from django.http import HttpResponse
+#from django.http import HttpResponseRedirect
+#from django.template import  RequestContext
+from django.contrib.sessions.backends.db import SessionStore
+
+def index(request):
+#class EdelbertoView (View):
+
+# XXX We use cookie!
+# Test cookie support
+    if request.session.test_cookie_worked():
+    #if session.test_cookie_worked():
+        return HttpResponse("Please enable cookies and try again.")
+        #return
+        print "Please enable cookies and try again."
+    else:
+        request.session['cn'] = request.META['Shib-inetOrgPerson-cn']
+        request.session['sn'] = request.META['Shib-inetOrgPerson-sn']
+        request.session['mail'] = request.META['Shib-inetOrgPerson-mail']
+        request.session['eppn'] = request.META['Shib-eduPerson-eduPersonPrincipalName']
+        #request.session['aff'] = request.META['Shib-brEduPerson-brEduAffiliationType']
+        request.session['aff'] = request.META['Shib-eduPerson-eduPersonAffiliation']
+        request.session['shib'] = request.META['Shib-Session-ID']
+
+        if 'mail' in request.session.keys():
+             print "Cookie: OK -> Content: cn:" + request.session["cn"] + " sn " +request.session["sn"] + " mail: " + request.session["mail"] + " eppn: " + request.session["eppn"]
+             #ip += "Cookie: OK -> Content: cn:" + request.session["cn"] + " mail: " + request.session["mail"] + " eppn: " + request.session["eppn"]  + "</body></html>"
+        else:
+             print "Cookie: nothing/clear"
+             #ip += "Cookie: nothing/clear </body></html>"
+
+   # return HttpResponse(ip)
+
+    # expose this so we can mention the backend URL on the welcome page
+    def default_env (self):
+        return {
+                 'MANIFOLD_URL':ConfigEngine().manifold_url(),
+                 }
+
+    # expose this so we can mention the backend URL on the welcome page
+    #def default_env (self):
+    #    config=Config()
+    #    return {
+    #            'MANIFOLD_URL':ConfigEngine().manifold_url(),
+    #            #'MANIFOLD_URL':config.manifold_url(),
+    #             }
+
+    # XXX It's only to test the association of pi and esilva@uff.br
+    if request.session["eppn"] == 'esilva@uff.br':
+        username = 'rezende@ufrj'
+        password = 'fibre2014'
+        print "eppn OK"
+    else:
+        username = request.session["mail"]
+        # this is ugly. We generate a simple password merging mail "fibre" and sn.
+        password = request.session["mail"] + "fibre" + request.session["sn"]
+
+        # If we have " we remove
+        username = username.replace('"','').strip()
+        password = password.replace('"','').strip()
+
+    # pass request within the token, so manifold session key can be attached to the request session.
+    #token = {'username': username, 'password': password, 'request': request}
+    #token = {'username': username, 'password': password}
+
+    # . a ManifoldResult - when something has gone wrong, like e.g. backend is unreachable
+    # . a django User in case of success
+    # . or None if the backend could be reached but the authentication failed
+    print "token CAFe"
+    #print token
+    #auth_result = authenticate(token=token)
+    #auth_result = authenticate(username=username, password=password)
+    auth_result = authenticate(username='rezende@ufrj', password='fibre2014', request=request)
+    print "Auth Result CAFe"
+    print auth_result
+    # high-level errors, like connection refused or the like
+
+    if isinstance (auth_result, ManifoldResult):
+        manifoldresult = auth_result
+        print ManifoldResult
+        print manifoldresult
+        #htm =  "<meta http-equiv=\"refresh\" content=\"0; url=https://200.130.15.182/login\" />"
+        htm = "not authenticated"
+        return HttpResponse (htm)
+        # user was authenticated at the backend
+    elif auth_result is not None:
+        user=auth_result
+
+        # Verifying if user is active to logging in
+        if user.is_active:
+            print "LOGGING IN"
+            login(request, user)
+            
+            #if request.user.is_authenticated():
+            #    env['person'] = username
+            #    env['username'] = username
+            #else:
+            #    env['person'] = None
+
+            htm = "<meta http-equiv=\"refresh\" content=\"0; url=https://200.130.15.182/login\" />"
+            #return HttpResponseRedirect ('/login-ok')
+            return HttpResponse (htm)
+        else:
+            # Today all CAFe accounts are actived
+            htm = "Your account is not active, please contact the site admin."
+            return HttpResponse (htm)
+
+    # otherwise
+    # Creating the user at manifold, myslice and sfa
+    else:
+        user_params = { 'email': username, 'password': password }
+        user_request = {}
+
+        user_request['auth_type'] = 'managed'
+
+        # XXX Common code, dependency ?
+        from Crypto.PublicKey import RSA
+        private = RSA.generate(1024)
+
+        # Example: private_key = '-----BEGIN RSA PRIVATE KEY-----\nMIIC...'
+        # Example: public_key = 'ssh-rsa AAAAB3...'
+        user_request['private_key'] = private.exportKey()
+        user_request['public_key']  = private.publickey().exportKey(format='OpenSSH')
+
+        splitmail = username.split("@")[0]
+        user = splitmail.replace('"','').strip()
+        hrn = "fibre." + user + str(randint(1,100000))
+
+        user_request['user_hrn'] = hrn
+
+        user_request['first_name'] = request.session['cn']
+        user_request['last_name'] = request.session['sn']
+        user_request['authority_hrn'] = "fibre"
+        user_request['email'] = username
+        user_request['password'] = password
+        user_request['public_key'] = user_request['public_key']
+        user_request['private_key'] = user_request['private_key']
+
+        # Verify in django
+        if PendingUser.objects.filter(email__iexact = user_request['email']):
+            htm = "Erro - User with same email from CAFe exists in Django"
+        # verify in manifol
+        user_query = Query().get('local:user').select('user_id','email')
+        user_details = execute_admin_query(request, user_query)
+        for user_detail in user_details:
+            if user_detail['email'] == user_request['email']:
+                htm = "Erro - user exist in SFA Registry"
+            try:
+                if user_detail['user_hrn'] == user_request['user_hrn']:
+                    htm =  "Erro - user with the same hrn in SFA Registry"
+            except:
+                continue
+
+
+        #create_pending_user(user_request, user_request, user_detail)
+
+        htm = "Now your CAFe user is associated with a MySlice account - Please login-ok in CAFe again."
+        return HttpResponse(htm)
+       # return HttpResponse(htm)
+
+   # login-ok sets state="Welcome to MySlice" in urls.py
+    def get (self, request, state=None):
+        env = self.default_env()
+        env['username']=the_user(request)
+        env['topmenu_items'] = topmenu_items(None, request)
+        if state: env['state'] = state
+        elif not env['username']: env['state'] = "Please sign in"
+        return HttpResponseRedirect ('/login-ok')
+    #return render_to_response('home-view.html',env, context_instance=RequestContext(request))
+
diff --git a/plugins/columns_editor/__init__.py b/plugins/columns_editor/__init__.py
new file mode 100644 (file)
index 0000000..3cc48a9
--- /dev/null
@@ -0,0 +1,91 @@
+from unfold.plugin import Plugin
+
+from django.template.loader import render_to_string
+
+# XXX We need naming helpers in the python Plugin class also, used in template
+
+class ColumnsEditor(Plugin):
+    def __init__ (self, query, query_all = None, **settings):
+        Plugin.__init__ (self, **settings)
+        self.query=query
+        self.query_uuid = query.query_uuid
+        self.query_all = query_all
+        self.query_all_uuid = query_all.query_uuid if query_all else None
+
+    def template_file(self):
+        return "columns_editor.html"
+
+    def requirements (self):
+        reqs = {
+            'js_files' : [
+                # XXX datatables
+                'js/columns_editor.js',
+            ] ,
+            'css_files': [
+                'css/query_editor.css',
+                'css/jquery-ui.css',
+            ]
+        }
+        return reqs
+
+    def export_json_settings (self):
+        return True
+
+    def template_env(self, request):
+        fields = []
+        #hidden_columns = self.hidden_columns
+        metadata = self.page.get_metadata()
+        md_fields = metadata.details_by_object('resource')
+
+        # XXX use django templating system here
+        for md_field in md_fields['column']:
+            if md_field['type'] == 'string':
+                if 'allowed_values' in md_field:
+                    allowed_values = md_field['allowed_values'].split(',')
+
+                    options = []
+                    for v in allowed_values:
+                        v_desc = v.split('-')
+                        options.append(v_desc[0])
+
+                    env = {
+                        'domid': self.domid,
+                        'options': options
+                    }
+                    filter_input = render_to_string('filter_input_string_values.html', env)
+                else:
+                    env = {
+                        'domid': self.domid,
+                        'field': md_field['name']
+                    }
+                    filter_input = render_to_string('filter_input_string.html', env)
+                    
+            elif md_field['type'] == 'int':
+                allowed_values = md_field.get('allowed_values', '0,0').split(',')
+                env = {
+                    'domid': self.domid,
+                    'field': md_field['name'],
+                    'min'  : allowed_values[0],
+                    'max'  : allowed_values[1]
+                }
+                filter_input = render_to_string('filter_input_integer.html', env)
+            else:
+                env = {
+                    'domid': self.domid,
+                    'field': md_field['name']
+                }
+                filter_input = render_to_string('filter_input_others.html', env)
+
+            fields.append({
+                'name':          md_field['name'],
+                'type':          md_field['type'],
+                'resource_type': 'N/A',
+                'filter_input':  filter_input,
+                'header':        None,
+                'checked':       md_field['name'] in self.query.get_select()
+            })
+        #return { 'fields': fields, 'hidden_columns': hidden_columns }
+        #return { 'fields': fields , 'query_uuid': self.query_uuid, 'query_all_uuid': self.query_all_uuid }
+        return { 'fields': fields }
+
+    def json_settings_list (self): return ['plugin_uuid', 'domid', 'query_uuid', 'query_all_uuid', ]
diff --git a/plugins/columns_editor/static/css/query_editor.css b/plugins/columns_editor/static/css/query_editor.css
new file mode 100644 (file)
index 0000000..4061d0f
--- /dev/null
@@ -0,0 +1,360 @@
+div.query-editor-spacer {
+    padding: 15px 5px;
+}
+
+table.query-editor {
+    width: 95%;
+    padding-bottom: 10px;
+}
+
+/* Add a scrollbar to autocomplete fields */
+.ui-autocomplete {
+    max-height: 100px;
+    overflow-y: auto;
+    /* prevent horizontal scrollbar */
+    overflow-x: hidden;
+    /* add padding to account for vertical scrollbar */
+    padding-right: 20px;
+    
+    /* NEED TO BE IMPROVED LATER... */
+    /* How to use properties from content class in /templates/myslice/css/myslice.css ? */
+    /* How to factorize this ? Maybe applied differently in other plugins ? */        
+    font-size: 11px;
+}
+.queryeditor-auto-filter{
+    width:200px;
+}
+/* IE 6 doesn't support max-height
+ * we use height instead, but this forces the menu to always be this tall
+ */
+* html .ui-autocomplete {
+    height: 100px;
+}
+
+table.query-editor {
+    margin: 0 auto;
+    clear: both;
+    /* width: 80%;*/
+    width: 300px;
+}
+
+table.query-editor input { 
+    font: normal 12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+}    
+
+table.query-editor thead th {
+    padding: 3px 18px 3px 3px; 
+    border-bottom: 1px solid black;
+    font-weight: bold;
+    cursor: pointer;
+    * cursor: hand;
+}
+
+table.query-editor tfoot th {
+    padding: 3px 18px 3px 10px;
+    border-top: 1px solid black;
+    font-weight: bold;
+}
+
+table.query-editor td {
+    padding: 2px 5px;
+    font: normal 12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+}
+
+table.query-editor td.center, table.query-editor th.center {
+    text-align: center;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * DataTables row classes
+ */
+table.query-editor tr.odd.gradeA {
+    background-color: #ddffdd;
+}
+
+table.query-editor tr.even.gradeA {
+    background-color: #eeffee;
+}
+
+table.query-editor tr.odd.gradeC {
+    background-color: #ddddff;
+}
+
+table.query-editor tr.even.gradeC {
+    background-color: #eeeeff;
+}
+
+table.query-editor tr.odd.gradeX {
+    background-color: #ffdddd;
+}
+
+table.query-editor tr.even.gradeX {
+    background-color: #ffeeee;
+}
+
+table.query-editor tr.odd.gradeU {
+    background-color: #ddd;
+}
+
+table.query-editor tr.even.gradeU {
+    background-color: #eee;
+}
+
+/* change color: T / even -> odd +1 +5 -3*/
+table.query-editor tr.odd.row_sliver td {
+    background-color: #9FAFD1;
+}
+
+table.query-editor tr.even.row_added td {
+    background-color: #b1d19f;
+}
+table.query-editor tr.odd.row_added td {
+    background-color: #a3c98f;
+}
+
+table.query-editor tr.even.row_removed td {
+    background-color: #d9b0b0;
+}
+
+table.query-editor tr.odd.row_removed td {
+    background-color: #d1a09f;
+}
+
+table.query-editor tr.gradeA {
+    background-color: #eeffee;
+}
+
+table.query-editor tr.gradeC {
+    background-color: #ddddff;
+}
+
+table.query-editor tr.gradeX {
+    background-color: #ffdddd;
+}
+
+table.query-editor tr.gradeU {
+    background-color: #ddd;
+}
+
+
+
+
+div.selected{background-color:gray; color:black}
+
+/* icons */
+.myslice-icon-timestamp {
+    background-image: url('images/myslice-icon-timestamp.png') !important;
+}
+.myslice-icon-filter {
+    background-image: url('images/myslice-icon-filter.png') !important;
+}
+.myslice-icon-fields {
+    background-image: url('images/myslice-icon-fields.png') !important;
+}
+.myslice-icon-groups {
+    background-image: url('images/myslice-icon-groups.png') !important;
+}
+.myslice-icon-summary {
+    background-image: url('images/myslice-icon-summary.png') !important;
+}
+.myslice-icon-resources {
+    background-image: url('images/myslice-icon-resources.png') !important;
+}
+.myslice-icon-users {
+    background-image: url('images/myslice-icon-users.png') !important;
+}
+
+a.source-url{
+    font-weight: bold;
+}
+
+span.bold {
+    font-weight: bold;
+}
+
+div#selectdescr {
+    padding-top:2em;
+    color: #555555;
+}
+
+span.short {
+    height:10px;
+}
+
+span.column-title {
+    font-size: 15px;
+    font-weight: bold;
+}
+
+span.column-detail {
+    font-size: 11px; 
+    font-style: italic;
+}
+
+span.group_info {
+    font-size: 11px; 
+    color: green;
+    font-weight: bold;
+}
+
+span.filter_info {
+    color: red;
+    font-weight: bold;
+}
+
+
+/* column configuation style */
+
+OPTION.out{
+    background-color:white;
+    color:black;
+}
+OPTION.in{
+    background-color:#CAE8EA; 
+    color:#4f6b72;
+}
+
+/* jordan disabled
+   div.out{background-color:white; color:black}
+   div.in{background-color:#CAE8EA; color:#4f6b72}
+   div.selected{background-color:gray; color:black}
+   div.invisible{display:none}
+   */
+
+div.note-div {
+    padding: 4px;
+    background-color: #cae8ea;
+    width: 800px;
+    margin-left:auto;
+    margin-right:auto;
+}
+
+div#scrolldiv_old {
+    border : solid 2px grey; 
+    padding:4px; 
+    width:300px; 
+    height:180px; 
+    overflow:auto;
+}
+
+th,td.top {
+    vertical-align: top;
+    text-align: left;
+    padding:10px;
+}
+
+tr.hidden {
+    display:none;
+}
+
+td.smallright {
+    text-align: right;
+    width:20px;
+}
+
+table.center {
+    margin-left:auto; 
+    margin-right:auto;
+}
+
+table.columnlist {
+    width:270px;
+}
+
+table.query-editor td.header {
+    background-color: #CAE8EA;
+    text-align: center;
+    width:30px;
+}
+
+span.header {
+    font-weight: bold;
+    color: #3399CC;
+}
+
+a.source-url{
+    font-weight: bold;
+}
+
+span.menubig {
+    font-size: 16px;
+    font-weight: bold;
+}
+
+span.menusmall {
+    font-size: 14px;
+    font-weight: bold;
+}
+
+span.menuright {
+    font-weight: bold;
+    float: right;
+}
+
+span.simpleright {
+    float: right;
+}
+
+span.gray{
+    color: #555555;
+}
+
+span.short {
+    height:10px;
+}
+
+span.column-title {
+    font-size: 13px;
+    font-weight: bold;
+}
+
+span.column-detail {
+    font-size: 11px; 
+    font-style: italic;
+}
+
+span.myslice_small {
+    font-size: 11px; 
+}
+
+span#username {
+    font-weight: bold;
+    font-size: 1.3em;
+}
+
+.filter_popup{
+    position:relative; /*this is the key*/
+    float: right;
+    z-index:24;
+    background: url('images/myslice-icon-filter.png') no-repeat;
+    /*background-color:#ccc;*/
+    width: 200px;
+    height: 300px;
+    color:#000;
+    text-decoration:none;
+    clear: both;
+}
+
+.filter_popup:hover{
+    z-index:25;
+/*background-color:#ff0*/
+}
+
+.filter_popup span{
+    display: none;
+}
+
+.filter_popup:hover span{ /*the span will display just on :hover state*/
+    display:block;
+    position:absolute;
+    /*top:1em;*/
+    left:-19em;
+    width: 20em;
+    font-size: 8pt;
+    border:1px solid #ccdddd;
+    background-color:#ddeeee;
+    color:#000;
+    text-align: left;
+    padding: 0em 0em 0em 1em;
+}
diff --git a/plugins/columns_editor/static/img/details_close.png b/plugins/columns_editor/static/img/details_close.png
new file mode 100644 (file)
index 0000000..fcc23c6
Binary files /dev/null and b/plugins/columns_editor/static/img/details_close.png differ
diff --git a/plugins/columns_editor/static/img/myslice-icon-filter.png b/plugins/columns_editor/static/img/myslice-icon-filter.png
new file mode 100644 (file)
index 0000000..b2f4ec7
Binary files /dev/null and b/plugins/columns_editor/static/img/myslice-icon-filter.png differ
diff --git a/plugins/columns_editor/static/js/columns_editor.js b/plugins/columns_editor/static/js/columns_editor.js
new file mode 100644 (file)
index 0000000..4ab9b7d
--- /dev/null
@@ -0,0 +1,352 @@
+/**
+ * Description: ColumnsEditor plugin
+ * Copyright (c) 2012-2013 UPMC Sorbonne Universite
+ * License: GPLv3
+ */
+
+// XXX TODO This plugin will be interested in changes in metadata
+// What if we remove a filter, is it removed in the right min/max field ???
+//  -> no on_filter_removed is not yet implemented
+// XXX if a plugin has not declared a handler, it might become inconsistent,
+// and the interface should either reset or disable it
+(function($){
+
+    var ColumnsEditor = Plugin.extend({
+
+        event_filter_added: function(op, suffix) {
+            suffix = (typeof suffix === 'undefined') ? '' : manifold.separator + suffix;
+            var self = this;
+            return function(e, ui) {
+                var array = self.array_from_id(e.target.id);
+                var key   = self.field_from_id(array); // No need to remove suffix...
+
+                // using autocomplete ui
+                if(typeof(ui) != "undefined"){
+                    var value = ui.item.value;
+                }else{
+                    var value = e.target.value;
+                }
+
+                if (value) {
+                    // XXX This should be handled by manifold
+                    //manifold.raise_event(object.options.query_uuid, FILTER_UPDATED, [key, op, value]);
+                    manifold.raise_event(self.options.query_uuid, FILTER_ADDED, [key, op, value]);
+                } else {
+                    // XXX This should be handled by manifold
+                    manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, [key, op]);
+                }
+            };
+        },
+
+        init: function(options, element) {
+            this._super(options, element);
+            this.listen_query(options.query_uuid);
+            // this one is the complete list of resources
+            // and will be bound to callbacks like on_all_new_record
+            this.listen_query(options.query_all_uuid, 'all');
+
+
+            this.elts('queryeditor-auto-filter').change(this.event_filter_added('='));
+            this.elts('queryeditor-filter').change(this.event_filter_added('='));
+            this.elts('queryeditor-filter-min').change(this.event_filter_added('>'));
+            this.elts('queryeditor-filter-max').change(this.event_filter_added('<'));
+
+            var self = this;
+            this.elts('queryeditor-check').click(function() { 
+                manifold.raise_event(self.options.query_uuid, this.checked?FIELD_ADDED:FIELD_REMOVED, this.value);
+            });
+
+            /* The following code adds an expandable column for the table
+            // XXX Why isn't it done statically ?
+            var nCloneTh = document.createElement( 'th' );
+            var nCloneTd = document.createElement( 'td' );
+            nCloneTd.innerHTML = "<span class='glyphicon glyphicon-chevron-right' style='cursor:pointer'></span>";
+            //nCloneTd.innerHTML = '<img src="/components/com_tophat/images/details_open.png">';
+            nCloneTh.innerHTML = '<b>Info</b>';
+            nCloneTd.className = "center";
+            nCloneTh.className = "center";
+            this.elmt('table thead tr').each(function() {
+                this.insertBefore(nCloneTh, this.childNodes[0]);
+            });
+            this.elmt('table tbody tr').each(function() {
+                this.insertBefore(nCloneTd.cloneNode( true ), this.childNodes[0]);
+            });
+            */
+         
+            // We are currently using a DataTable display, but another browsing component could be better
+            //jQuery('#'+this.options.plugin_uuid+'-table').dataTable...
+            /*
+            var  metaTable = this.elmt('table').dataTable({
+// Thierry : I'm turning off all the dataTables options for now, so that
+// the table displays more properly again, might need more tuning though
+//                bFilter     : false,
+//                bPaginate   : false,
+//                bInfo       : false,
+//                sScrollX    : '100%',         // Horizontal scrolling
+//                sScrollY    : '200px',
+//                //bJQueryUI   : true,           // Use jQuery UI
+//                bProcessing : true,           // Loading
+//                aaSorting   : [[ 1, "asc" ]], // sort by column fields on load
+//                aoColumnDefs: [
+//                    { 'bSortable': false, 'aTargets': [ 0 ]},
+//                    { 'sWidth': '8px', 'aTargets': [ 0 ] },
+//                    { 'sWidth': '8px', 'aTargets': [ 4 ] } // XXX NB OF COLS
+//                ]
+            });
+            this.table = metaTable;
+            */
+            this.table = this.elmt('table');
+
+            // Actions on the newly added fields
+            this.elmt('table tbody td span').on('click', function() {
+                var nTr = this.parentNode.parentNode;
+                // use jQuery UI instead of images to keep a common UI
+                // class="glyphicon glyphicon-chevron-down treeclick tree-minus"
+                // East oriented Triangle class="glyphicon-chevron-right"
+                // South oriented Triangle class="glyphicon-chevron-down"
+                
+                if (this.hasClass("glyphicon-chevron-right")) {
+                    this.removeClass("glyphicon-chevron-right").addClass("glyphicon-chevron-down");
+                    // XXX ??????
+                    metaTable.fnOpen(nTr, this.fnFormatDetails(metaTable, nTr, self.options.plugin_uuid+'_div'), 'details' );
+                } else {
+                    this.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-right");
+                    metaTable.fnClose(nTr);
+                }
+            });
+
+            this.elmt('table_wrapper').css({
+                'padding-top'   : '0em',
+                'padding-bottom': '0em'
+            });
+            
+            // autocomplete list of tags
+            this.availableTags = {};
+
+        }, // init
+
+        /* UI management */
+
+        check_field: function(field)
+        {
+            this.elmt('check', field).attr('checked', true);
+        },
+
+        uncheck_field: function(field)
+        {
+            this.elmt('check', field).attr('checked', false);
+        },
+
+        update_filter_value: function(filter, removed)
+        {
+            removed = !(typeof removed === 'undefined'); // default = False
+
+            var key   = filter[0];
+            var op    = filter[1];
+            var value = filter[2];
+
+            var id = this.id_from_field(key);
+
+            if (op == '=') {
+                var element = this.elmt(id);
+            } else {
+                var suffix;
+                if (op == '<') {
+                    this.elmt(id, 'max').val(value);
+                } else if (op == '>') {
+                    this.elmt(id, 'min').val(value);
+                } else {
+                    return;
+                }
+                var element = this.elmt(id, suffix);
+            }
+
+            element.val(removed?null:value);
+
+        },
+
+        /* Events */
+
+        on_filter_added: function(filter)
+        {
+            this.update_filter_value(filter);
+        },
+
+        on_filter_removed: function(filter)
+        {
+            this.update_filter_value(filter, true);
+        },
+
+        on_field_added: function(field)
+        {
+            this.check_field(field);
+        },
+
+        on_field_removed: function(field)
+        {
+            this.uncheck_field(field);
+        },
+
+        /* RECORD HANDLERS */
+        on_query_done: function()
+        {
+            //console.log("Query_Editor: query_done!");
+            //console.log(this.availableTags);
+        },
+        /* Autocomplete based on query_all to get all the fields, where query get only the fields selected  */
+        on_all_new_record: function(record)
+        {
+            /*
+            availableTags = this.availableTags;           
+            jQuery.each(record,function(key,value){
+                value = unfold.get_value(value);
+                if(!availableTags.hasOwnProperty(key)){availableTags[key]=new Array();}
+                //availableTags[key].push(value);
+                var currentArray = availableTags[key];
+                if(value!=null){
+                    if(jQuery.inArray(value,currentArray)==-1){availableTags[key].push(value);}
+                }
+           });
+           this.availableTags = availableTags;
+           this.update_autocomplete(availableTags);
+           */
+        },
+
+        /* Former code not used at the moment */
+
+        print_field_description: function(field_header, div_id) 
+        { 
+            //var selected = all_headers[field_header];
+            var selected = getMetadata_field('resource',field_header);
+
+            field_header = div_id+"_"+field_header;
+
+            var output = "<div id='desc"+field_header+"'>";
+
+            output += "<div id='divinfo"+field_header+"'>";
+            output += '<p><span class="column-title">'+selected['title']+'</span></p></span>'; 
+            output += '<p><span class="column-detail">'+selected['description']+'</span></p></span>'; 
+
+            var period_select = "<select id='selectperiod"+field_header+"'><option value='Now'> Now </option><option value='latest'> Latest  </option><option value=w> Week </option><option value=m> Month </option><option value=y> Year </option></select>";
+
+            if (selected['value_type'] == 'string') {
+
+                var values_select = "<p><select id='selectvalues"+field_header+"' MULTIPLE size=3>";
+
+                output += '<p>Values: ';
+
+                var values_list = selected['allowed_values'].split(",");
+
+                for (var value_index = 0; value_index < values_list.length ; value_index++) {
+                    var value_desc = values_list[value_index].split("-");
+                    if (value_index > 0)
+                        output += ', ';
+                    output += '<span class="bold">'+value_desc[0]+'</span>';
+                    values_select += "<option value ='"+value_desc[0]+"'>&nbsp;"+value_desc[0];
+                    if (value_desc[1]!='') 
+                        output += ' ('+value_desc[1]+')';
+
+                    values_select += "&nbsp;</option>";
+                }
+                values_select += "</select>";
+            }
+            else
+                output+='<p>Unit: '+selected['unit'];
+
+            output+= '</p>';
+
+            output += '<p>Source: <a class="source-url" target="source_window" href="'+selected['platform_url']+'">'+selected['platform']+'</a>';
+
+            //if (selected['via'] != '') 
+                //output += ' via <a class="source-url" target="source_window" href="http://'+selected['via_url']+'">'+selected['via']+'</a>';
+
+            output += '</p>';
+            output += "</div>";
+
+    /*
+            output += "<div id='divgroup"+field_header+"'>";
+            output += "<p>Group resources with the same value <input type=checkbox></input>";
+            output += "<p>Select aggregator : <select><option>Count</option><option selected=true>Average</option><option>Maximum</option><option>Minimum</option></select>";
+            output += "</div>";
+            output += "<div id='divtime"+field_header+"'>";
+            output += "<p>Select timestamp : ";
+            output += period_select;
+            output += "</div>";
+    */
+            output += "</div>";
+
+            return output;
+        },
+
+        update_autocomplete: function(availableTags)
+        {
+            var self = this;
+            var domid = this.options.plugin_uuid;
+            
+            jQuery.each(availableTags, function(key, value){
+                value.sort();
+                // using dataTables's $ to search also in nodes that are not currently displayed
+                var element = self.table.$("#"+domid+"__field__"+key);
+
+                element.autocomplete({
+                            source: value,
+                            selectFirst: true,
+                            minLength: 0, // allows to browse items with no value typed in
+                            select: self.event_filter_added('=')
+                });
+            });                
+        }, // update_autocomplete     
+
+/*
+        update_autocomplete: function(e, rows, current_query)
+        {
+            var d = data;
+            d.current_query = current_query;
+            var availableTags={};
+            jQuery.each (rows, function(index, obj) {                    
+                jQuery.each(obj,function(key,value){                       
+                    value = unfold.get_value(value); 
+                    if(!availableTags.hasOwnProperty(key)){availableTags[key]=new Array();}
+                    //availableTags[key].push(value);
+                    var currentArray=availableTags[key];
+                    if(value!=null){
+                        if(jQuery.inArray(value,currentArray)==-1){availableTags[key].push(value);}
+                    }
+                });                    
+            });
+            jQuery.each(availableTags, function(key, value){
+                value.sort();
+                jQuery("#"+options.plugin_uuid+"-filter-"+key).autocomplete({
+                            source: value,
+                            selectFirst: true,
+                            minLength: 0, // allows to browse items with no value typed in
+                            select: function(event, ui) {
+                                var key=getKeySplitId(this.id,"-");
+                                var op='=';
+                                var val=ui.item.value;
+                                
+                                query=d.current_query;
+                                query.update_filter(key,op,val);
+                                // Publish the query changed, the other plugins with subscribe will get the changes
+                                jQuery.publish('/query/' + query.uuid + '/changed', query);
+                                //add_ActiveFilter(this.id,'=',ui.item.value,d);
+                            }
+                });
+            });                
+        }, // update_autocomplete     
+*/
+        fnFormatDetails: function( metaTable, nTr, div_id ) 
+        {
+            var aData = metaTable.fnGetData( nTr );
+            var sOut = '<blockquote>';
+            //sOut += prepare_tab_description(aData[1].substr(21, aData[1].length-21-7), div_id);
+            sOut += this.print_field_description(aData[1].substring(3, aData[1].length-4), div_id);
+            sOut += '</blockquote>';
+         
+            return sOut;
+        }
+    });
+
+    $.plugin('ColumnsEditor', ColumnsEditor);
+
+})(jQuery);
diff --git a/plugins/columns_editor/templates/columns_editor.html b/plugins/columns_editor/templates/columns_editor.html
new file mode 100644 (file)
index 0000000..1d66e98
--- /dev/null
@@ -0,0 +1,45 @@
+<!--
+       $infopopup = <<<EOF
+<span class='info'><span> This tab allows you to customize the visible columns in the resource list, below. Note that information on the nodes comes from a variety of monitoring sources.  If you, as either a user or a provider of monitoring data, would like to see additional columns made available, please send us your request in mail to <a href='mailto:support@myslice.info'>support@myslice.info</a>. You can find more information about the MySlice project at <a href='http://trac.myslice.info'>http://trac.myslice.info</a>.  </span></span>
+EOF;
+
+           $filter_input = "<input id='filter_value' type=text size=5></input>";
+
+EOF; -->
+<div class='query-editor-spacer'>
+  <table id='{{domid}}__table' class='query-editor'>
+    <thead>
+      <tr>
+        <th class='center'>Info</th>
+        <th class='center'>Field</th>
+        <!--
+        <th class='center'>Resource</th>
+        <th class='center'>Type</th>
+        <th class='center'>Filter</th>
+        -->
+        <th class='center'>+/-</th>
+      </tr>
+    </thead>
+    <tbody>
+
+    {# Loop through metadata and display related information #}
+    {% for field in fields %}
+
+      <tr>
+        <td class='center'><span class='glyphicon glyphicon-chevron-right' style='cursor:pointer'></span></td>
+        <td class='center'>{{ field.name }}</td>
+        <!--
+        <td class='center'>{{ field.resource_type }}</td>
+        <td class='center'>{{ field.type }}</td>
+        <td class='center'>{{ field.filter_input }}</td>
+        -->
+        <td class='center'>
+          <input class='queryeditor-check' id='{{domid}}__check__{{ field.name }}' name='{{ field.header }}' type='checkbox' autocomplete='off' value='{{ field.name }}' {% if field.checked %} checked {% endif %}></input>
+        </td>
+      </tr>
+               
+       {% endfor %}
+
+    </tbody>
+  </table>
+</div>
diff --git a/plugins/columns_editor/templates/filter_input_integer.html b/plugins/columns_editor/templates/filter_input_integer.html
new file mode 100644 (file)
index 0000000..bdbacb6
--- /dev/null
@@ -0,0 +1,5 @@
+<div class="ui-widget content" style="margin-top:0px;">
+<label for='{{field}}'></label>
+<input class='queryeditor-filter-min' id='{{domid}}__field__{{field}}__min' type=text size=3 value='{{ min }}'></input>&nbsp;-
+<input class='queryeditor-filter-max' id='{{domid}}__field__{{field}}__max' type=text size=3 value='{{ max }}'></input>
+</div>
diff --git a/plugins/columns_editor/templates/filter_input_others.html b/plugins/columns_editor/templates/filter_input_others.html
new file mode 100644 (file)
index 0000000..14e6033
--- /dev/null
@@ -0,0 +1,4 @@
+<div class='ui-widget content' style='margin-top:0px;'>
+    <label for='{{field}}'></label>
+    <input class='queryeditor-auto-filter' id='{{domid}}__field__{{field}}' type='text' style='width:206px;'></input>
+</div>
diff --git a/plugins/columns_editor/templates/filter_input_string.html b/plugins/columns_editor/templates/filter_input_string.html
new file mode 100644 (file)
index 0000000..110f16d
--- /dev/null
@@ -0,0 +1,4 @@
+<div class='ui-widget content' style='margin-top:0px;'>
+  <label for='{{domid}}__field__{{field}}'></label>
+  <input class='queryeditor-auto-filter' id='{{domid}}__field__{{field}}' type='text' style='width:206px;'></input>
+</div>
diff --git a/plugins/columns_editor/templates/filter_input_string_values.html b/plugins/columns_editor/templates/filter_input_string_values.html
new file mode 100644 (file)
index 0000000..6a8aeca
--- /dev/null
@@ -0,0 +1,6 @@
+<select class='queryeditor-filter' id='$filter_id'>
+    <option value=''>Show all</option>
+       {% for option in options %}
+       <option>{{option}}</option>
+       {% endfor %}
+</select>
diff --git a/plugins/scheduler2/__init__.py b/plugins/scheduler2/__init__.py
new file mode 100755 (executable)
index 0000000..02765a3
--- /dev/null
@@ -0,0 +1,79 @@
+from unfold.plugin import Plugin\r
+import datetime\r
+from datetime import timedelta\r
+\r
+class Scheduler2 (Plugin):\r
+\r
+\r
+    def __init__ (self, query, query_all_resources, query_lease = None, **settings):\r
+        Plugin.__init__ (self, **settings)\r
+        \r
+        self.query=query\r
+        self.query_all_resources = query_all_resources\r
+        self.query_all_resources_uuid = query_all_resources.query_uuid\r
+\r
+        self.query_lease = query_lease\r
+        self.query_lease_uuid = query_lease.query_uuid\r
+\r
+        #query_lease.query_uuid if query_lease else None\r
+\r
+        #granularity in minutes\r
+        granularity = 10\r
+        #self.time_slots = []\r
+        self.time_slots = self.createTimeSlots(granularity)\r
+        self.nodes = [\r
+                        ['Grid Nodes' , ['node016', 'node017', 'node018', 'node019', 'node020', 'node021',  'node029', 'node030', 'node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031','node031',]],\r
+                        ['Other Nodes' , ['node022', 'node023', 'node024','node025', 'node026', 'node027', 'node028',]]\r
+                    ]\r
+\r
+    def template_file (self):\r
+        return "scheduler.html"\r
+\r
+    def requirements (self):\r
+        reqs = {\r
+            'js_files' : [\r
+                'js/angular/angular.min.js',\r
+                'js/scheduler2.js',\r
+                'js/scheduler-SchedulerCtrl.js',\r
+                #'js/slider/jquery-ui-1.10.3.slider.min.js',\r
+                'js/scheduler-helpers.js',\r
+                'js/scheduler-table-selector.js',\r
+            ],\r
+            'css_files': [\r
+                'css/scheduler2.css', \r
+                #'css/slider/jquery-ui-1.10.3.slider.min.css', \r
+            ]\r
+        }\r
+        return reqs\r
+\r
+    # the list of things passed to the js plugin\r
+    def json_settings_list (self):\r
+        # query_uuid will pass self.query results to the javascript\r
+        # and will be available as "record" in :\r
+        # on_new_record: function(record)\r
+        return ['plugin_uuid', 'domid', 'query_uuid', 'time_slots', 'nodes', 'query_lease_uuid', 'query_all_resources_uuid']\r
+    \r
+\r
+    def export_json_settings (self):\r
+        return True\r
+    \r
+    #Creates an Array with the timespans depending on granularity\r
+    def createTimeSlots (this, granularity):\r
+        #return type\r
+        time_slots = []\r
+        #init times\r
+        time_s = datetime.time(0,00)\r
+        time_f = datetime.time(23,59)\r
+        now = datetime.datetime.now()\r
+        #calc diffs\r
+        dt_s = datetime.datetime.combine(now,time_s)\r
+        dt_f = datetime.datetime.combine(now,time_f)\r
+        #loop\r
+        while (dt_s < dt_f):\r
+            tmp = dt_s\r
+            dt_s =  dt_s + datetime.timedelta(minutes=granularity)\r
+            ts = str(tmp.hour).zfill(2) + ':' + str(tmp.minute).zfill(2) + '<span>-</span>' + str(dt_s.hour).zfill(2) + ':' + str(dt_s.minute).zfill(2)\r
+            time_slots.append(ts)\r
+        #return\r
+        return time_slots\r
+    \r
diff --git a/plugins/scheduler2/static/css/scheduler2.css b/plugins/scheduler2/static/css/scheduler2.css
new file mode 100755 (executable)
index 0000000..e4de904
--- /dev/null
@@ -0,0 +1,269 @@
+/*\r
+#\r
+# Copyright (c) 2012 NITLab, University of Thessaly, CERTH, Greece\r
+#\r
+# Permission is hereby granted, free of charge, to any person obtaining a copy\r
+# of this software and associated documentation files (the "Software"), to deal\r
+# in the Software without restriction, including without limitation the rights\r
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+# copies of the Software, and to permit persons to whom the Software is\r
+# furnished to do so, subject to the following conditions:\r
+#\r
+# The above copyright notice and this permission notice shall be included in\r
+# all copies or substantial portions of the Software.\r
+#\r
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\r
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+# THE SOFTWARE.\r
+#\r
+#\r
+# This is a MySlice plugin for the NITOS Scheduler\r
+# NITOScheduler v8\r
+#\r
+*/\r
+.m-t {\r
+    margin-top:5px;\r
+}\r
+.m-b {\r
+    margin-bottom:5px;\r
+}\r
+.m-none {\r
+    margin:0;\r
+}\r
+\r
+.form-control {\r
+    padding-right: 30px;\r
+}\r
+\r
+.form-control + .glyphicon {\r
+    position: absolute;\r
+    right: 0;\r
+    padding: 8px 27px;\r
+}\r
+\r
+#time-range {\r
+    margin-top:10px;\r
+}\r
+#TopologyModal .modal-dialog {\r
+    width: 700px;\r
+}\r
+#TopologyModal .modal-body {\r
+    position: relative;\r
+    overflow-y: auto;\r
+    max-height: 100%;\r
+    padding: 15px;\r
+}\r
+#TopologyModal .modal-header, #TopologyModal .modal-body, #TopologyModal .modal-footer {\r
+    background: none repeat scroll 0 0 #FFFFFF;\r
+}\r
+#TopologyModal .modal-header {\r
+    border-radius: 11px 11px 0 0;\r
+}\r
+#TopologyModal .modal-body {\r
+    border-radius: 0 0 11px 11px;\r
+}\r
+\r
+#scheduler .table {\r
+    background:#fff;\r
+}\r
+\r
+#scheduler .control-label {\r
+    margin-top: 5px;\r
+}\r
+#lbltime {\r
+    display: inline-block;\r
+    font-size: 1.2em;\r
+    margin-top: 0;\r
+    padding: 6px;\r
+}\r
+\r
+/** tables css **/\r
+\r
+/*#ShedulerNodes-scroll-container {\r
+    float: left;\r
+    overflow-x: scroll;\r
+    overflow-y: hidden;\r
+    width: 15%;\r
+}\r
+#ShedulerNodes {\r
+    border-collapse: collapse;\r
+    border-spacing: 0;\r
+    max-width: 500px;\r
+    width: 450px;\r
+    margin-top: 6px !important;\r
+}\r
+\r
+#ShedulerNodes th{\r
+    height: 60px;\r
+}\r
+\r
+#ShedulerNodes td{\r
+    background: url("../img/podcast-15-w.png") no-repeat scroll 3px 50% #30196D;\r
+    border: 1px solid #CDCDCD;\r
+    color: #FFFFFF;\r
+    height: 27px;\r
+    padding: 0 3px 0 19px;\r
+}\r
+\r
+#ShedulerNodes td.verticalIndex {\r
+    padding: 0 2px !important;\r
+}\r
+\r
+#ShedulerNodes td .verticalText {\r
+    -webkit-transform: rotate(-90deg);\r
+    -moz-transform: rotate(-90deg);\r
+    -ms-transform: rotate(-90deg);\r
+    -o-transform: rotate(-90deg);\r
+    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);\r
+    margin-left: -30px;\r
+    position: absolute;\r
+    transform: rotate(-90deg); \r
+}\r
+\r
+#reservation-table-scroll-container {\r
+    overflow-x: scroll;\r
+    overflow-y: visible;\r
+    padding-bottom: 1px;\r
+    width:85%;\r
+}\r
+\r
+\r
+#scheduler-reservation-table {\r
+    border-spacing:0;\r
+    border-collapse:collapse;\r
+    margin-bottom: 0 !important;\r
+    overflow: auto;\r
+    width: 100%;\r
+}\r
+\r
+\r
+    */\r
+/*background: url("../img/opened-lock-15.png") no-repeat scroll 50% 50% transparent;*/\r
+/*\r
+#scheduler-reservation-table td {\r
+    border: 1px solid #FFFFFF;\r
+    cursor: pointer;\r
+    height: 27px;\r
+    padding: 3px 0 2px;\r
+    text-align: center;\r
+    width: 25px;\r
+}\r
+\r
+#scheduler-reservation-table td img{\r
+    height: 15px;\r
+}\r
+\r
+#scheduler-reservation-table td.fixed, #scheduler-reservation-table th.fixed{\r
+    position:absolute; \r
+    width:4em; \r
+    top:auto;\r
+    border-right: 2px none black; \r
+}\r
+\r
+#scheduler-reservation-table td.info, #scheduler-reservation-table th  {\r
+    background: #30196D;\r
+    font-weight:normal;\r
+    color: #fff;\r
+    height: 25px;\r
+    padding: 0 3px;\r
+    width: auto;\r
+}\r
+\r
+#scheduler-reservation-table th span {\r
+    display: block;\r
+    line-height: 3px;\r
+    margin: 0 auto;\r
+    padding: 0 5px;\r
+    width: 3px;\r
+}\r
+    \r
+*/\r
+#scheduler-reservation-table {\r
+    margin-top: 0 !important;\r
+}\r
+#scheduler-reservation-table tbody tr {\r
+    border: none !important;\r
+}\r
+#scheduler-reservation-table tbody tr td{\r
+    background-color: #A6C9E2 ;\r
+    border: 1px solid #111111;\r
+}\r
+\r
+#scheduler-reservation-table tbody tr.even td{\r
+    background-color: #E0E0E0 ;\r
+}\r
+\r
+#scheduler-reservation-table tbody tr th::selection {color:    #000000;background:transparent;}\r
+#scheduler-reservation-table tbody tr th::-moz-selection {color:       #000000;background:transparent;}\r
+\r
+#scheduler-reservation-table tbody tr td.free {\r
+}\r
+\r
+#scheduler-reservation-table tbody tr td.reserved {\r
+    background: url("../img/closed-lock-15.png") no-repeat scroll 50% 50% #DD4444;\r
+    cursor: not-allowed;\r
+}\r
+\r
+#scheduler-reservation-table tbody tr td.maintenance {\r
+    background: url("../img/tools-15.png") no-repeat scroll 50% 50% #EDA428;\r
+}\r
+\r
+#scheduler-reservation-table tbody tr td.free:hover ,#scheduler-reservation-table tbody tr td.selected, #scheduler-reservation-table tbody tr td.selected_tmp {\r
+    background: #25BA25;\r
+}\r
+\r
+td.no-image {\r
+    background-image: none !important;\r
+    padding: 0 !important;\r
+}\r
+\r
+\r
+/*legend*/\r
+\r
+.legend ol {\r
+    font-size: 0.8em;\r
+    list-style: none;\r
+    padding: 0;\r
+}\r
+\r
+.legend ol li{\r
+    background: #a6c9e2; /* Old browsers */\r
+    background: -moz-linear-gradient(left, #a6c9e2 28px, #e0e0e0 28px); /* FF3.6+ */\r
+    background: -webkit-gradient(linear, left top, right top, color-stop(28px,#a6c9e2), color-stop(28px,#e0e0e0)); /* Chrome,Safari4+ */\r
+    background: -webkit-linear-gradient(left, #a6c9e2 28px,#e0e0e0 28px); /* Chrome10+,Safari5.1+ */\r
+    background: -o-linear-gradient(left, #a6c9e2 28px,#e0e0e0 28px); /* Opera 11.10+ */\r
+    background: -ms-linear-gradient(left, #a6c9e2 28px,#e0e0e0 28px); /* IE10+ */\r
+    background: linear-gradient(to right, #a6c9e2 28px,#e0e0e0 28px); /* W3C */\r
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a6c9e2', endColorstr='#e0e0e0',GradientType=1 ); /* IE6-9 */\r
+\r
+    padding: 3px 0 3px 30px;\r
+    width: 109px;\r
+}\r
+\r
+.legend ol li.free{\r
+\r
+}\r
+\r
+.legend ol li.closed{\r
+    background: url("../img/closed-lock-15.png") no-repeat scroll 8px 50% #DD4444;\r
+}\r
+\r
+.legend ol li.maintenance {\r
+    background: url("../img/tools-15.png") no-repeat scroll 8px 50% #EDA428;\r
+}\r
+\r
+.legend ol li.selected {\r
+    background: #25BA25;\r
+}\r
+\r
+/* latest stuff */\r
+.sliderContainer {\r
+    margin: 10px 0;\r
+}\r
+.table-responsive{\r
+    overflow: hidden !important;\r
+}
\ No newline at end of file
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png b/plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100755 (executable)
index 0000000..5b5dab2
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_flat_0_aaaaaa_40x100.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100755 (executable)
index 0000000..ad3d634
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_55_fbf9ee_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100755 (executable)
index 0000000..42ccba2
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100755 (executable)
index 0000000..5a46b47
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_dadada_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100755 (executable)
index 0000000..86c2baa
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_e6e6e6_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png
new file mode 100755 (executable)
index 0000000..e65ca12
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_glass_75_ffffff_1x400.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100755 (executable)
index 0000000..7c9fa6c
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100755 (executable)
index 0000000..0e05810
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png
new file mode 100755 (executable)
index 0000000..b273ff1
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_222222_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png
new file mode 100755 (executable)
index 0000000..09d1cdc
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_2e83ff_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png
new file mode 100755 (executable)
index 0000000..59bd45b
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_454545_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png
new file mode 100755 (executable)
index 0000000..6d02426
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_888888_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png
new file mode 100755 (executable)
index 0000000..2ab019b
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png b/plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png
new file mode 100755 (executable)
index 0000000..c986935
Binary files /dev/null and b/plugins/scheduler2/static/css/slider/images/ui-icons_f6cf3b_256x240.png differ
diff --git a/plugins/scheduler2/static/css/slider/jquery-ui-1.10.3.slider.min.css b/plugins/scheduler2/static/css/slider/jquery-ui-1.10.3.slider.min.css
new file mode 100755 (executable)
index 0000000..3b7a2c1
--- /dev/null
@@ -0,0 +1,1614 @@
+/*!
+ * jQuery UI Bootstrap (0.5)
+ * http://addyosmani.github.com/jquery-ui-bootstrap
+ *
+ * Copyright 2012 - 2013, Addy Osmani
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Portions copyright jQuery UI & Twitter Bootstrap
+ */
+
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { 
+  border: 0; clip: rect(0 0 0 0);
+  height: 1px; 
+  margin: -1px; 
+  overflow: hidden; 
+  padding: 0; 
+  position: absolute; 
+  width: 1px; 
+}
+.ui-helper-reset { 
+  margin: 0; 
+  padding: 0; 
+  border: 0; 
+  outline: 0; 
+  line-height: 1.3; 
+  text-decoration: none; 
+  font-size: 100%; 
+  list-style: none; 
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+  content: "";
+  display: table;
+}
+.ui-helper-clearfix:after { 
+  content: "."; 
+  display: block; 
+  height: 0; 
+  clear: both; 
+  visibility: hidden; 
+}
+.ui-helper-clearfix { 
+  /*display: inline-block; */
+  display:block;
+  min-height: 0; /* support: IE7 */
+}
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { 
+  height:1%; 
+}
+
+/* end clearfix */
+.ui-helper-zfix { 
+  width: 100%; 
+  height: 100%; 
+  top: 0; 
+  left: 0; 
+  position: absolute; 
+  opacity: 0; 
+  filter:Alpha(Opacity=0); 
+}
+.ui-front {
+  z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { 
+  display: block; 
+  text-indent: -99999px; 
+  overflow: hidden; 
+  background-repeat: no-repeat; 
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { 
+  position: absolute; 
+  top: 0; 
+  left: 0; 
+  width: 100%; 
+  height: 100%; 
+}
+
+/*
+ * jQuery UI Resizable 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/resizable/
+ */
+
+.ui-resizable { 
+  position: relative;
+}
+.ui-resizable-handle { 
+  position: absolute;
+  font-size: 0.1px;
+  z-index: 99999; 
+  display: block; 
+}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { 
+  display: none; 
+}
+.ui-resizable-n { 
+  cursor: n-resize; 
+  height: 7px; 
+  width: 100%; 
+  top: -5px; 
+  left: 0; 
+}
+.ui-resizable-s { 
+  cursor: s-resize; 
+  height: 7px; 
+  width: 100%; 
+  bottom: -5px; 
+  left: 0; 
+}
+.ui-resizable-e { 
+  cursor: e-resize; 
+  width: 7px; 
+  right: -5px; 
+  top: 0; 
+  height: 100%; 
+}
+.ui-resizable-w { 
+  cursor: w-resize; 
+  width: 7px; 
+  left: -5px; 
+  top: 0; 
+  height: 100%; 
+}
+.ui-resizable-se { 
+  cursor: se-resize; 
+  width: 12px; 
+  height: 12px; 
+  right: 1px; 
+  bottom: 1px; 
+}
+.ui-resizable-sw { 
+  cursor: sw-resize; 
+  width: 9px; 
+  height: 9px; 
+  left: -5px; 
+  bottom: -5px; 
+}
+.ui-resizable-nw { 
+  cursor: nw-resize; 
+  width: 9px; 
+  height: 9px; 
+  left: -5px; 
+  top: -5px; 
+}
+.ui-resizable-ne { 
+  cursor: ne-resize; 
+  width: 9px; 
+  height: 9px; 
+  right: -5px; 
+  top: -5px;
+}
+
+/*
+ * jQuery UI Selectable 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/selectable/
+ */
+.ui-selectable-helper { 
+  position: absolute; 
+  z-index: 100; 
+  border:1px dotted black; 
+}
+
+/*
+ * jQuery UI CSS Framework 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * 
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
+ */
+
+/* Component containers
+----------------------------------*/
+.ui-widget {   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size:13px; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #404040; }
+.ui-widget-content a { color: #404040; }
+.ui-widget-header {
+  font-weight:bold;
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border:1px solid #666;
+
+ }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear background-image;
+  -moz-transition: 0.1s linear background-image;
+  -ms-transition: 0.1s linear background-image;
+  -o-transition: 0.1s linear background-image;
+  transition: 0.1s linear background-image;
+   overflow: visible;
+
+ }
+
+
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
+  background-position: 0 -15px;
+  color: #333;
+  text-decoration: none;
+ }
+
+.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa;  font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+
+
+.ui-state-highlight p, .ui-state-error p, .ui-state-default p{
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 18px;
+  margin:7px 15px;
+}
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {
+
+
+  position: relative;
+  margin-bottom: 18px;
+  color: #404040;
+  background-color: #eedc94;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));
+  background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));
+  background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -o-linear-gradient(top, #fceec1, #eedc94);
+  background-image: linear-gradient(top, #fceec1, #eedc94);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #eedc94 #eedc94 #e4c652;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  border-width: 1px;
+  border-style: solid;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+
+
+}
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
+
+
+  position: relative;
+  margin-bottom: 18px;
+  color: #ffffff;
+  border-width: 1px;
+  border-style: solid;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+ background-color: #c43c35;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(top, #ee5f5b, #c43c35);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #c43c35 #c43c35 #882a25;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+
+
+}
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none;  }
+.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_f6cf3b_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, 
+.ui-corner-top, 
+.ui-corner-left, 
+.ui-corner-tl { 
+  -moz-border-radius-topleft: 4px; 
+  -webkit-border-top-left-radius: 4px; 
+  -khtml-border-top-left-radius: 4px; 
+  border-top-left-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-top, 
+.ui-corner-right, 
+.ui-corner-tr { 
+  -moz-border-radius-topright: 4px; 
+  -webkit-border-top-right-radius: 4px; 
+  -khtml-border-top-right-radius: 4px; 
+  border-top-right-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-bottom, 
+.ui-corner-left, 
+.ui-corner-bl { 
+  -moz-border-radius-bottomleft: 4px; 
+  -webkit-border-bottom-left-radius: 4px; 
+  -khtml-border-bottom-left-radius: 4px; 
+  border-bottom-left-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-bottom, 
+.ui-corner-right, 
+.ui-corner-br { 
+  -moz-border-radius-bottomright: 4px; 
+  -webkit-border-bottom-right-radius: 4px; 
+  -khtml-border-bottom-right-radius: 4px; 
+  border-bottom-right-radius: 4px; 
+}
+
+
+/* Overlays */
+
+.ui-widget-overlay { 
+  background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 
+  opacity: .30;
+  filter:Alpha(Opacity=30); 
+}
+
+.ui-widget-shadow { 
+  margin: -8px 0 0 -8px; 
+  padding: 8px; 
+  background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 
+  opacity: .30;filter:Alpha(Opacity=30); 
+  -moz-border-radius: 8px; 
+  -khtml-border-radius: 8px; 
+  -webkit-border-radius: 8px; 
+  border-radius: 8px; 
+}
+
+/*
+ * jQuery UI Accordion 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/accordion/
+ */
+
+/* IE/Win - Fix animation bug - #4615 */
+
+.ui-accordion { 
+  width: 100%; 
+}
+.ui-accordion .ui-accordion-header { 
+  cursor: pointer; 
+  position: relative; 
+  margin-top: 1px; 
+  zoom: 1; 
+  font-weight:bold; 
+}
+.ui-accordion .ui-accordion-li-fix { 
+  display: inline; 
+}
+.ui-accordion .ui-accordion-header-active { 
+  border-bottom: 0 !important; 
+}
+.ui-accordion .ui-accordion-header a { 
+  display: block; 
+  font-size: 1em; 
+  padding: .5em .5em .5em 1.7em; 
+}
+.ui-accordion-icons .ui-accordion-header a { 
+  padding-left: 2.2em; 
+}
+.ui-accordion .ui-accordion-header .ui-icon { 
+  position: absolute; 
+  left: .5em; 
+  top: 50%; 
+  margin-top: -8px; 
+}
+.ui-accordion .ui-accordion-content { 
+  padding: 1em 2.2em; 
+  border-top: 0; 
+  margin-top: -2px; 
+  position: relative; 
+  top: 1px; 
+  margin-bottom: 2px; 
+  overflow: auto; 
+  display: none; 
+  zoom: 1; 
+}
+.ui-accordion .ui-accordion-content-active { 
+  display: block; 
+}
+
+/*
+ * jQuery UI Autocomplete 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/autocomplete/
+ */
+
+.ui-autocomplete { 
+  position: absolute; 
+  top: 0;
+  left: 0;
+  cursor: default; 
+}
+
+/*
+ * jQuery UI Button 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+
+.ui-button {
+
+  cursor: pointer;
+  display: inline-block;
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  padding: 5px 14px 6px;
+  margin: 0;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear background-image;
+  -moz-transition: 0.1s linear background-image;
+  -ms-transition: 0.1s linear background-image;
+  -o-transition: 0.1s linear background-image;
+  transition: 0.1s linear background-image;
+   overflow: visible;
+} /* the overflow property removes extra width in IE */
+
+.ui-button-primary {
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+
+.ui-button-success{
+  color:#ffffff;
+  background-color: #57a957;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
+  background-image: -moz-linear-gradient(top, #62c462, #57a957);
+  background-image: -ms-linear-gradient(top, #62c462, #57a957);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
+  background-image: -webkit-linear-gradient(top, #62c462, #57a957);
+  background-image: -o-linear-gradient(top, #62c462, #57a957);
+  background-image: linear-gradient(top, #62c462, #57a957);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #57a957 #57a957 #3d773d;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-error{
+  color:#ffffff;
+  background-color: #c43c35;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(top, #ee5f5b, #c43c35);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #c43c35 #c43c35 #882a25;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+
+.ui-button .ui-button-text { display: block;   }
+.ui-button-text-only .ui-button-text {  }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; /*tempfix*/ display:none;}
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+/* input.ui-button { padding: .4em 1em; } */
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { top: 50%; margin-top:-3px; margin-bottom:3px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+
+
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-state-active {
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.4em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+
+
+/*
+ * jQuery UI Menu 1.10.0
+ *
+* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+
+.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float:left; outline: none; }
+.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
+.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1;float: left;clear: left; width: 100%; }
+.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
+.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
+.ui-menu .ui-menu-item a.ui-state-focus,
+.ui-menu .ui-menu-item a.ui-state-active { 
+  font-weight: normal; 
+  margin: 0; 
+  color: #ffffff;
+  background: #0064cd;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/* Fix problem with border in ui-state-active */
+.ui-menu .ui-menu-item a.ui-state-active {
+  padding: 1px .4em;
+}
+
+.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
+.ui-menu .ui-state-disabled a { cursor: default; }
+
+/* icon support */
+.ui-menu-icons { position: relative; }
+.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
+
+/* left-aligned */
+.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
+
+/* right-aligned */
+.ui-menu .ui-menu-icon { position: static; float: right; }
+
+.ui-menu { width: 200px; margin-bottom: 2em; }
+
+
+/*
+ * jQuery UI spinner 1.10.0
+ *
+* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+
+.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
+.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
+.ui-spinner{}
+.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
+.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
+.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
+.ui-spinner-up { top: 0; }
+.ui-spinner-down { bottom: 0; }
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+    /* need to fix icons sprite */
+    background-position:-65px -16px;
+}
+
+/*
+ * jQuery UI Dialog 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { 
+  position: absolute; 
+  top: 0; 
+  left: 0; 
+  padding: .2em; 
+  width: 300px; 
+  overflow: hidden; 
+  outline: 0; 
+  background-clip: padding-box;
+  background-color: #FFFFFF;
+  border: 1px solid rgba(0, 0, 0, 0.3);
+  border-radius: 6px 6px 6px 6px;
+  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  /*left: 50%;
+  margin-left: -280px;*/
+  outline: medium none;
+  position: fixed;
+  /*top: 10%;
+  width: 560px;*/
+  z-index: 1050;
+}
+.ui-dialog .ui-dialog-titlebar { /*padding: .4em 1em;*/
+  position: relative;
+  padding:5px 15px;
+  border:0px 0px 0px 1px solid;
+  border-color: white;
+  padding: 5px 15px;
+  font-size: 18px;
+  text-decoration:none;
+  background:none;
+  -moz-border-radius-bottomright: 0px;
+  -webkit-border-bottom-right-radius: 0px;
+  -khtml-border-bottom-right-radius: 0px;
+
+  -moz-border-radius-bottomleft: 0px;
+  -webkit-border-bottom-left-radius: 0px;
+  -khtml-border-bottom-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+  border-bottom:1px solid #ccc;
+}
+.ui-dialog .ui-dialog-title {
+  float: left;
+  color:#404040;
+  font-weight:bold;
+  margin-top:5px;
+  margin-bottom:5px;
+  padding:5px;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+.ui-dialog .ui-dialog-titlebar-close {
+  position: absolute;
+  right: .3em;
+  top: 50%;
+  width: 19px;
+  margin: -20px 0 0 0;
+  padding: 1px;
+  height: 18px;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 13.5px;
+  text-shadow: 0 1px 0 #ffffff;
+  filter: alpha(opacity=25);
+  -khtml-opacity: 0.25;
+  -moz-opacity: 0.25;
+  opacity: 0.25;
+  background:none;
+  border-width: 0;
+  border:none;
+  box-shadow: none;
+}
+
+.ui-dialog .ui-dialog-titlebar-close span { 
+  display: block; 
+  margin: 1px;
+  text-indent: 9999px;
+}
+
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 1px;   filter: alpha(opacity=90);
+  -khtml-opacity: 0.90;
+  -moz-opacity: 0.90;
+  opacity: 0.90;   
+}
+
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+
+.ui-dialog .ui-dialog-buttonpane {
+  text-align: left;
+  border-width: 1px 0 0 0;
+  background-image: none;
+  margin: .5em 0 0 0;
+  background-color: #f5f5f5;
+  padding: 5px 15px 5px;
+  border-top: 1px solid #ddd;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+  -moz-box-shadow: inset 0 1px 0 #ffffff;
+  box-shadow: inset 0 1px 0 #ffffff;
+  zoom: 1;
+  margin-bottom: 0;
+
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+
+.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button{
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0;
+
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+
+}
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+
+/*
+ * jQuery UI Tabs 1.9.2
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/tabs/
+ */
+ .ui-tabs .ui-tabs-nav{ background:none; border-color: #ddd;border-style: solid;border-width: 0 0 1px;}
+.ui-tabs { position: relative; padding: .2em; zoom: 1; border:0px;} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+
+
+.ui-tabs .ui-tabs-nav li:hover, .ui-tabs .ui-tabs-nav li a:hover{
+  background:whiteSmoke;
+  border-bottom:1px solid #ddd;
+  padding-bottom:0px;
+   color:#00438A;
+}
+
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; border-bottom:1px solid #DDD; }
+.ui-tabs .ui-tabs-nav li {  text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px; }
+
+.ui-tabs-nav .ui-state-default{
+  -webkit-box-shadow: 0px 0px 0px #ffffff; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
+     -moz-box-shadow: 0px 0px 0px #ffffff; /* FF3.5 - 3.6 */
+          box-shadow: 0px 0px 0px #ffffff; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
+}
+.ui-tabs .ui-tabs-nav li a {
+  float: left;
+  text-decoration: none;
+  cursor: text;
+  padding: 0 15px;
+  margin-right: 2px;
+  line-height: 34px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+
+
+ }
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; padding-bottom: 0px; outline:none;}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active , .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: #ffffff;
+  cursor: default;
+  color:gray;
+  outline:none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a{background-color: #ffffff;outline:none;border:none;}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active:hover{
+  background:#ffffff;
+  outline:none;
+  margin-bottom:0px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
+/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs-panel .ui-button{text-decoration:none;}
+.ui-tabs .ui-tabs-hide { display: none !important; }
+
+
+/* IE fix for background inheritance from ui-widget*/
+.ui-tabs .ui-tabs-nav li{
+  filter:none;
+}
+
+/*
+ * jQuery UI Tooltip 1.9.0
+ *
+ * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/tooltip/
+ */
+.ui-tooltip {
+    padding:8px;
+    position:absolute;
+    z-index:9999;
+    max-width: 300px;
+    -o-box-shadow: 0 0 5px #ddd;
+    -moz-box-shadow: 0 0 5px #ddd;
+    -webkit-box-shadow: 0 0 5px #ddd;
+    /*box-shadow: 0 2px 5px #ddd;*/
+    box-shadow: inset 0 1px 0 #ffffff;
+}
+
+body .ui-tooltip { border-width:2px; }
+
+/*
+ * jQuery UI Datepicker 1.9.0
+ *
+ * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/datepicker/
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px; font-weight: bold; width: 100%; padding: 4px 0; background-color: #f5f5f5; color: #808080; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { /*top: 1px;*/ }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+
+.ui-datepicker .ui-datepicker-prev-hover { /*left:1px;*/ }
+.ui-datepicker .ui-datepicker-next-hover { /*right:1px;*/ }
+
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+  display: none; /*sorry for IE5*/
+  display/**/: block; /*sorry for IE5*/
+  position: absolute; /*must have*/
+  z-index: -1; /*must have*/
+  filter: mask(); /*must have*/
+  top: -4px; /*must have*/
+  left: -4px; /*must have*/
+  width: 200px; /*must have*/
+  height: 200px; /*must have*/
+}
+
+.ui-datepicker th{
+  font-weight: bold;
+  color: gray;
+}
+
+.ui-datepicker-today a:hover{
+  background-color: #808080;
+  color: #ffffff;
+
+}
+.ui-datepicker-today a{
+  background-color: #BFBFBF;
+  cursor: pointer;
+  padding: 0 4px;
+  margin-bottom:0px;
+
+}
+
+
+.ui-datepicker td a{
+  margin-bottom:0px;
+  border:0px;
+}
+
+.ui-datepicker td:hover{
+    color: #ffffff;
+}
+
+.ui-datepicker td .ui-state-default {
+  border:0px;
+  background:none;
+  margin-bottom:0px;
+  padding:5px;
+  color:gray;
+  text-align: center;
+  filter:none;
+}
+
+
+.ui-datepicker td .ui-state-active{
+  background:#BFBFBF;
+  margin-bottom:0px;
+  font-size:normal;
+  text-shadow: 0px;
+  color: #ffffff;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.ui-datepicker td .ui-state-hover {
+    color: #ffffff;
+    background: #0064cd;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    -khtml-border-radius: 4px;
+    border-radius: 4px;
+}
+
+/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%;
+
+/*this can be removed if ui-widget-header is blue*/
+    color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ }
+
+
+
+/*** Input field styling from Bootstrap **/
+ input, textarea {
+  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+  transition: border linear 0.2s, box-shadow linear 0.2s;
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+input:focus, textarea:focus {
+  outline: 0;
+  border-color: rgba(82, 168, 236, 0.8);
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+input[type=file]:focus, input[type=checkbox]:focus, select:focus {
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+  outline: 1px dotted #666;
+}
+
+input[type="text"],
+input[type="password"],
+.ui-autocomplete-input,
+textarea,
+.uneditable-input {
+  display: inline-block;
+  padding: 4px;
+  font-size: 13px;
+  line-height: 18px;
+  color: #808080;
+  border: 1px solid #ccc;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+
+
+/**Toolbar**/
+
+.ui-toolbar{
+  padding: 7px 14px;
+  margin: 0 0 18px;
+  background-color: #f5f5f5;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
+  background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
+  background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: linear-gradient(top, #ffffff, #f5f5f5);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+  border: 1px solid #ddd;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+  -moz-box-shadow: inset 0 1px 0 #ffffff;
+  box-shadow: inset 0 1px 0 #ffffff;
+}
+
+
+/***Dialog fixes**/
+
+.ui-dialog-buttonset .ui-button:nth-child(2){
+  cursor: pointer;
+  display: inline-block;
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  padding: 5px 14px 6px;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear all;
+  -moz-transition: 0.1s linear all;
+  -ms-transition: 0.1s linear all;
+  -o-transition: 0.1s linear all;
+  transition: 0.1s linear all;
+   overflow: visible;
+}
+
+
+
+/***Wijmo Theming**/
+
+div.wijmo-wijmenu{
+  padding:0 20px;
+  background-color: #222;
+  background-color: #222222;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+
+.wijmo-wijmenu .ui-state-default{
+  box-shadow: none;
+  color:#BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-default .wijmo-wijmenu-text{    
+  color:#BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-hover{
+  background: #444;
+  background: rgba(255, 255, 255, 0.05);
+}
+
+.wijmo-wijmenu .ui-state-hover .wijmo-wijmenu-text{
+  color:#ffffff;
+}
+
+div.wijmo-wijmenu .ui-widget-header h3{
+  position: relative;
+  margin-top:1px;
+  padding:0;
+}
+
+.wijmo-wijmenu h3 a{
+  color: #FFFFFF;
+  display: block;
+  float: left;
+  font-size: 20px;
+  font-weight: 200;
+  line-height: 1;
+  margin-left: -20px;
+  margin-top:1px;
+  padding: 8px 20px 12px;
+}
+
+.wijmo-wijmenu h3 a:hover{
+  background-color: rgba(255, 255, 255, 0.05);
+  color: #FFFFFF;
+  text-decoration: none;
+}
+
+.wijmo-wijmenu .ui-widget-header{
+  border:0px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child{
+  padding: 0.3em 0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child{
+  background: #333;
+  border:0;
+  margin:0;
+  padding: 6px 0;
+  width:160px;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item{
+  margin:0;
+  border:0;
+}
+
+.wijmo-wijmenu a.wijmo-wijmenu-link{
+  margin:0;
+  line-height: 19px;
+  padding: 10px 10px 11px;
+  border:0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius:0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-link{
+  display:block;
+  float:none;
+  padding: 4px 15px;
+  width:auto;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-text
+{
+  float:none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child .ui-state-hover {
+  background: #191919;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-separator{
+  padding: 5px 0;
+  background-image: none;
+  background-color: #222;
+  border-top: 1px solid #444;
+  border-bottom:0;
+  border-left:0;
+  border-right:0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input {
+  -moz-transition: none 0s ease 0s;
+  background-color: rgba(255, 255, 255, 0.3);
+  border: 1px solid #111111;
+  border-radius: 4px 4px 4px 4px;
+  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
+  color: rgba(255, 255, 255, 0.75);
+  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+  line-height: 1;
+  margin: 5px 10px 0 10px;
+  padding: 4px 9px;
+  width:100px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:hover {
+  background-color: rgba(255, 255, 255, 0.5);
+  color: #FFFFFF;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:focus {
+  background-color: #FFFFFF;
+  border: 0 none;
+  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+  color: #404040;
+  outline: 0 none;
+  padding: 5px 10px;
+  text-shadow: 0 1px 0 #FFFFFF;
+}
+
+
+.wijmo-wijmenu .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+  text-shadow:none;
+}
+
+
+.wijmo-wijmenu .ui-state-default{
+  box-shadow: none;
+  color:#BFBFBF;
+  filter: none;
+}
+
diff --git a/plugins/scheduler2/static/img/closed-lock-15.png b/plugins/scheduler2/static/img/closed-lock-15.png
new file mode 100755 (executable)
index 0000000..5f52630
Binary files /dev/null and b/plugins/scheduler2/static/img/closed-lock-15.png differ
diff --git a/plugins/scheduler2/static/img/closed-lock.png b/plugins/scheduler2/static/img/closed-lock.png
new file mode 100755 (executable)
index 0000000..806fb44
Binary files /dev/null and b/plugins/scheduler2/static/img/closed-lock.png differ
diff --git a/plugins/scheduler2/static/img/loading-7b6dc55620a355b55b835f6b4c300f9b.gif b/plugins/scheduler2/static/img/loading-7b6dc55620a355b55b835f6b4c300f9b.gif
new file mode 100755 (executable)
index 0000000..0de4cb9
Binary files /dev/null and b/plugins/scheduler2/static/img/loading-7b6dc55620a355b55b835f6b4c300f9b.gif differ
diff --git a/plugins/scheduler2/static/img/loading.gif b/plugins/scheduler2/static/img/loading.gif
new file mode 100755 (executable)
index 0000000..973571e
Binary files /dev/null and b/plugins/scheduler2/static/img/loading.gif differ
diff --git a/plugins/scheduler2/static/img/nitos_topo.png b/plugins/scheduler2/static/img/nitos_topo.png
new file mode 100755 (executable)
index 0000000..528407b
Binary files /dev/null and b/plugins/scheduler2/static/img/nitos_topo.png differ
diff --git a/plugins/scheduler2/static/img/opened-lock-15.png b/plugins/scheduler2/static/img/opened-lock-15.png
new file mode 100755 (executable)
index 0000000..da6a923
Binary files /dev/null and b/plugins/scheduler2/static/img/opened-lock-15.png differ
diff --git a/plugins/scheduler2/static/img/opened-lock.png b/plugins/scheduler2/static/img/opened-lock.png
new file mode 100755 (executable)
index 0000000..9fba7c8
Binary files /dev/null and b/plugins/scheduler2/static/img/opened-lock.png differ
diff --git a/plugins/scheduler2/static/img/podcast-15-w.png b/plugins/scheduler2/static/img/podcast-15-w.png
new file mode 100755 (executable)
index 0000000..658d142
Binary files /dev/null and b/plugins/scheduler2/static/img/podcast-15-w.png differ
diff --git a/plugins/scheduler2/static/img/podcast-15.png b/plugins/scheduler2/static/img/podcast-15.png
new file mode 100755 (executable)
index 0000000..70495da
Binary files /dev/null and b/plugins/scheduler2/static/img/podcast-15.png differ
diff --git a/plugins/scheduler2/static/img/podcast.png b/plugins/scheduler2/static/img/podcast.png
new file mode 100755 (executable)
index 0000000..6a96d4c
Binary files /dev/null and b/plugins/scheduler2/static/img/podcast.png differ
diff --git a/plugins/scheduler2/static/img/pushpin-1.png b/plugins/scheduler2/static/img/pushpin-1.png
new file mode 100755 (executable)
index 0000000..4b4bf22
Binary files /dev/null and b/plugins/scheduler2/static/img/pushpin-1.png differ
diff --git a/plugins/scheduler2/static/img/tools-15.png b/plugins/scheduler2/static/img/tools-15.png
new file mode 100755 (executable)
index 0000000..ffd9847
Binary files /dev/null and b/plugins/scheduler2/static/img/tools-15.png differ
diff --git a/plugins/scheduler2/static/img/tools.png b/plugins/scheduler2/static/img/tools.png
new file mode 100755 (executable)
index 0000000..421e5f8
Binary files /dev/null and b/plugins/scheduler2/static/img/tools.png differ
diff --git a/plugins/scheduler2/static/js/angular/angular.min.js b/plugins/scheduler2/static/js/angular/angular.min.js
new file mode 100755 (executable)
index 0000000..a71d0c7
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ AngularJS v1.3.0-beta.4
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(R,U,s){'use strict';function A(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.3.0-beta.4/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function cb(b){if(null==b||Ba(b))return!1;
+var a=b.length;return 1===b.nodeType&&a?!0:C(b)||M(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function r(b,a,c){var d;if(b)if(F(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(b.forEach&&b.forEach!==r)b.forEach(a,c);else if(cb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Tb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Zc(b,
+a,c){for(var d=Tb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Ub(b){return function(a,c){b(c,a)}}function db(){for(var b=ja.length,a;b;){b--;a=ja[b].charCodeAt(0);if(57==a)return ja[b]="A",ja.join("");if(90==a)ja[b]="0";else return ja[b]=String.fromCharCode(a+1),ja.join("")}ja.unshift("0");return ja.join("")}function Vb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function t(b){var a=b.$$hashKey;r(arguments,function(a){a!==b&&r(a,function(a,c){b[c]=a})});Vb(b,a);return b}function Q(b){return parseInt(b,
+10)}function Wb(b,a){return t(new (t(function(){},{prototype:b})),a)}function z(){}function Ca(b){return b}function Y(b){return function(){return b}}function E(b){return"undefined"===typeof b}function w(b){return"undefined"!==typeof b}function W(b){return null!=b&&"object"===typeof b}function C(b){return"string"===typeof b}function zb(b){return"number"===typeof b}function pa(b){return"[object Date]"===va.call(b)}function M(b){return"[object Array]"===va.call(b)}function F(b){return"function"===typeof b}
+function eb(b){return"[object RegExp]"===va.call(b)}function Ba(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function $c(b){return!(!b||!(b.nodeName||b.prop&&b.attr&&b.find))}function ad(b,a,c){var d=[];r(b,function(b,f,h){d.push(a.call(c,b,f,h))});return d}function fb(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Da(b,a){var c=fb(b,a);0<=c&&b.splice(c,1);return a}function $(b,a){if(Ba(b)||b&&b.$evalAsync&&b.$watch)throw Na("cpws");
+if(a){if(b===a)throw Na("cpi");if(M(b))for(var c=a.length=0;c<b.length;c++)a.push($(b[c]));else{c=a.$$hashKey;r(a,function(b,c){delete a[c]});for(var d in b)a[d]=$(b[d]);Vb(a,c)}}else(a=b)&&(M(b)?a=$(b,[]):pa(b)?a=new Date(b.getTime()):eb(b)?a=RegExp(b.source):W(b)&&(a=$(b,{})));return a}function Xb(b,a){a=a||{};for(var c in b)!b.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(a[c]=b[c]);return a}function wa(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;
+var c=typeof b,d;if(c==typeof a&&"object"==c)if(M(b)){if(!M(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!wa(b[d],a[d]))return!1;return!0}}else{if(pa(b))return pa(a)&&b.getTime()==a.getTime();if(eb(b)&&eb(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||Ba(b)||Ba(a)||M(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!F(b[d])){if(!wa(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==s&&!F(a[d]))return!1;
+return!0}return!1}function Yb(){return U.securityPolicy&&U.securityPolicy.isActive||U.querySelector&&!(!U.querySelector("[ng-csp]")&&!U.querySelector("[data-ng-csp]"))}function gb(b,a){var c=2<arguments.length?xa.call(arguments,2):[];return!F(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(xa.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function bd(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=
+s:Ba(a)?c="$WINDOW":a&&U===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function qa(b,a){return"undefined"===typeof b?s:JSON.stringify(b,bd,a?"  ":null)}function Zb(b){return C(b)?JSON.parse(b):b}function Oa(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=P(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function ga(b){b=v(b).clone();try{b.empty()}catch(a){}var c=v("<div>").append(b).html();try{return 3===b[0].nodeType?P(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,
+function(a,b){return"<"+P(b)})}catch(d){return P(c)}}function $b(b){try{return decodeURIComponent(b)}catch(a){}}function ac(b){var a={},c,d;r((b||"").split("&"),function(b){b&&(c=b.split("="),d=$b(c[0]),w(d)&&(b=w(c[1])?$b(c[1]):!0,a[d]?M(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function bc(b){var a=[];r(b,function(b,d){M(b)?r(b,function(b){a.push(ya(d,!0)+(!0===b?"":"="+ya(b,!0)))}):a.push(ya(d,!0)+(!0===b?"":"="+ya(b,!0)))});return a.length?a.join("&"):""}function Ab(b){return ya(b,
+!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ya(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function cd(b,a){function c(a){a&&d.push(a)}var d=[b],e,f,h=["ng:app","ng-app","x-ng-app","data-ng-app"],g=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(h,function(a){h[a]=!0;c(U.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(r(b.querySelectorAll("."+a),c),r(b.querySelectorAll("."+
+a+"\\:"),c),r(b.querySelectorAll("["+a+"]"),c))});r(d,function(a){if(!e){var b=g.exec(" "+a.className+" ");b?(e=a,f=(b[2]||"").replace(/\s+/g,",")):r(a.attributes,function(b){!e&&h[b.name]&&(e=a,f=b.value)})}});e&&a(e,f?[f]:[])}function cc(b,a){var c=function(){b=v(b);if(b.injector()){var c=b[0]===U?"document":ga(b);throw Na("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=dc(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",
+function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(R&&!d.test(R.name))return c();R.name=R.name.replace(d,"");Pa.resumeBootstrap=function(b){r(b,function(b){a.push(b)});c()}}function hb(b,a){a=a||"_";return b.replace(dd,function(b,d){return(d?a:"")+b.toLowerCase()})}function Bb(b,a,c){if(!b)throw Na("areq",a||"?",c||"required");return b}function Qa(b,a,c){c&&M(b)&&(b=b[b.length-1]);Bb(F(b),a,"not a function, got "+(b&&"object"==typeof b?
+b.constructor.name||"Object":typeof b));return b}function za(b,a){if("hasOwnProperty"===b)throw Na("badname",a);}function ec(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,h=0;h<f;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&F(b)?gb(e,b):b}function Cb(b){var a=b[0];b=b[b.length-1];if(a===b)return v(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return v(c)}function ed(b){var a=A("$injector"),c=A("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||A;return b.module||
+(b.module=function(){var b={};return function(e,f,h){if("hasOwnProperty"===e)throw c("badname","module");f&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return n}}if(!f)throw a("nomod",e);var c=[],d=[],l=b("$injector","invoke"),n={_invokeQueue:c,_runBlocks:d,requires:f,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide",
+"constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};h&&l(h);return n}())}}())}function fd(b){t(b,{bootstrap:cc,copy:$,extend:t,equals:wa,element:v,forEach:r,injector:dc,noop:z,bind:gb,toJson:qa,fromJson:Zb,identity:Ca,isUndefined:E,isDefined:w,isString:C,isFunction:F,isObject:W,isNumber:zb,isElement:$c,isArray:M,
+version:gd,isDate:pa,lowercase:P,uppercase:Ea,callbacks:{counter:0},$$minErr:A,$$csp:Yb});Ra=ed(R);try{Ra("ngLocale")}catch(a){Ra("ngLocale",[]).provider("$locale",hd)}Ra("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:id});a.provider("$compile",fc).directive({a:jd,input:gc,textarea:gc,form:kd,script:ld,select:md,style:nd,option:od,ngBind:pd,ngBindHtml:qd,ngBindTemplate:rd,ngClass:sd,ngClassEven:td,ngClassOdd:ud,ngCloak:vd,ngController:wd,ngForm:xd,ngHide:yd,ngIf:zd,ngInclude:Ad,
+ngInit:Bd,ngNonBindable:Cd,ngPluralize:Dd,ngRepeat:Ed,ngShow:Fd,ngStyle:Gd,ngSwitch:Hd,ngSwitchWhen:Id,ngSwitchDefault:Jd,ngOptions:Kd,ngTransclude:Ld,ngModel:Md,ngList:Nd,ngChange:Od,required:hc,ngRequired:hc,ngValue:Pd}).directive({ngInclude:Qd}).directive(Db).directive(ic);a.provider({$anchorScroll:Rd,$animate:Sd,$browser:Td,$cacheFactory:Ud,$controller:Vd,$document:Wd,$exceptionHandler:Xd,$filter:jc,$interpolate:Yd,$interval:Zd,$http:$d,$httpBackend:ae,$location:be,$log:ce,$parse:de,$rootScope:ee,
+$q:fe,$sce:ge,$sceDelegate:he,$sniffer:ie,$templateCache:je,$timeout:ke,$window:le,$$rAF:me,$$asyncCallback:ne})}])}function Sa(b){return b.replace(oe,function(a,b,d,e){return e?d.toUpperCase():d}).replace(pe,"Moz$1")}function Eb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],m=a,k,l,n,q,p,u;if(!d||null!=b)for(;e.length;)for(k=e.shift(),l=0,n=k.length;l<n;l++)for(q=v(k[l]),m?q.triggerHandler("$destroy"):m=!m,p=0,q=(u=q.children()).length;p<q;p++)e.push(Fa(u[p]));return f.apply(this,arguments)}
+var f=Fa.fn[b],f=f.$original||f;e.$original=f;Fa.fn[b]=e}function O(b){if(b instanceof O)return b;C(b)&&(b=aa(b));if(!(this instanceof O)){if(C(b)&&"<"!=b.charAt(0))throw Fb("nosel");return new O(b)}if(C(b)){var a=U.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);Gb(this,a.childNodes);v(U.createDocumentFragment()).append(this)}else Gb(this,b)}function Hb(b){return b.cloneNode(!0)}function Ga(b){kc(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Ga(b[a])}function lc(b,
+a,c,d){if(w(d))throw Fb("offargs");var e=ka(b,"events");ka(b,"handle")&&(E(a)?r(e,function(a,c){Ta(b,c,a);delete e[c]}):r(a.split(" "),function(a){E(c)?(Ta(b,a,e[a]),delete e[a]):Da(e[a]||[],c)}))}function kc(b,a){var c=b[ib],d=Ua[c];d&&(a?delete Ua[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),lc(b)),delete Ua[c],b[ib]=s))}function ka(b,a,c){var d=b[ib],d=Ua[d||-1];if(w(c))d||(b[ib]=d=++qe,d=Ua[d]={}),d[a]=c;else return d&&d[a]}function mc(b,a,c){var d=ka(b,"data"),e=w(c),f=!e&&
+w(a),h=f&&!W(a);d||h||ka(b,"data",d={});if(e)d[a]=c;else if(f){if(h)return d&&d[a];t(d,a)}else return d}function Ib(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function jb(b,a){a&&b.setAttribute&&r(a.split(" "),function(a){b.setAttribute("class",aa((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+aa(a)+" "," ")))})}function kb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g,
+" ");r(a.split(" "),function(a){a=aa(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",aa(c))}}function Gb(b,a){if(a){a=a.nodeName||!w(a.length)||Ba(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function nc(b,a){return lb(b,"$"+(a||"ngController")+"Controller")}function lb(b,a,c){b=v(b);9==b[0].nodeType&&(b=b.find("html"));for(a=M(a)?a:[a];b.length;){for(var d=b[0],e=0,f=a.length;e<f;e++)if((c=b.data(a[e]))!==s)return c;b=v(d.parentNode||11===d.nodeType&&d.host)}}function oc(b){for(var a=
+0,c=b.childNodes;a<c.length;a++)Ga(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function pc(b,a){var c=mb[a.toLowerCase()];return c&&qc[b.nodeName]&&c}function re(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||U);if(E(c.defaultPrevented)){var f=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;f.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=
+function(){return c.defaultPrevented||!1===c.returnValue};var h=Xb(a[e||c.type]||[]);r(h,function(a){a.call(b,c)});8>=V?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ha(b){var a=typeof b,c;"object"==a&&null!==b?"function"==typeof(c=b.$$hashKey)?c=b.$$hashKey():c===s&&(c=b.$$hashKey=db()):c=b;return a+":"+c}function Va(b){r(b,this.put,this)}function rc(b){var a,c;"function"==
+typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(se,""),c=c.match(te),r(c[1].split(ue),function(b){b.replace(ve,function(b,c,d){a.push(d)})})),b.$inject=a):M(b)?(c=b.length-1,Qa(b[c],"fn"),a=b.slice(0,c)):Qa(b,"fn",!0);return a}function dc(b){function a(a){return function(b,c){if(W(b))r(b,Ub(a));else return a(b,c)}}function c(a,b){za(a,"service");if(F(b)||M(b))b=n.instantiate(b);if(!b.$get)throw Wa("pget",a);return l[a+g]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],
+c,d,f,g;r(a,function(a){if(!k.get(a)){k.put(a,!0);try{if(C(a))for(c=Ra(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,f=0,g=d.length;f<g;f++){var h=d[f],m=n.get(h[0]);m[h[1]].apply(m,h[2])}else F(a)?b.push(n.invoke(a)):M(a)?b.push(n.invoke(a)):Qa(a,"module")}catch(l){throw M(a)&&(a=a[a.length-1]),l.message&&(l.stack&&-1==l.stack.indexOf(l.message))&&(l=l.message+"\n"+l.stack),Wa("modulerr",a,l.stack||l.message||l);}}});return b}function f(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===
+h)throw Wa("cdep",m.join(" <- "));return a[d]}try{return m.unshift(d),a[d]=h,a[d]=b(d)}catch(e){throw a[d]===h&&delete a[d],e;}finally{m.shift()}}function d(a,b,e){var f=[],g=rc(a),h,m,k;m=0;for(h=g.length;m<h;m++){k=g[m];if("string"!==typeof k)throw Wa("itkn",k);f.push(e&&e.hasOwnProperty(k)?e[k]:c(k))}a.$inject||(a=a[h]);return a.apply(b,f)}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(M(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return W(e)||F(e)?e:c},get:c,
+annotate:rc,has:function(b){return l.hasOwnProperty(b+g)||a.hasOwnProperty(b)}}}var h={},g="Provider",m=[],k=new Va,l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,Y(b))}),constant:a(function(a,b){za(a,"constant");l[a]=b;q[a]=b}),decorator:function(a,b){var c=n.get(a+g),d=c.$get;c.$get=function(){var a=p.invoke(d,c);return p.invoke(b,null,{$delegate:a})}}}},n=l.$injector=f(l,function(){throw Wa("unpr",
+m.join(" <- "));}),q={},p=q.$injector=f(q,function(a){a=n.get(a+g);return p.invoke(a.$get,a)});r(e(b),function(a){p.invoke(a||z)});return p}function Rd(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;r(a,function(a){b||"a"!==P(a.nodeName)||(b=a)});return b}function f(){var b=c.hash(),d;b?(d=h.getElementById(b))?d.scrollIntoView():(d=e(h.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):
+a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(f)});return f}]}function ne(){this.$get=["$$rAF","$timeout",function(b,a){return b.supported?function(a){return b(a)}:function(b){return a(b,0,!1)}}]}function we(b,a,c,d){function e(a){try{a.apply(null,xa.call(arguments,1))}finally{if(u--,0===u)for(;I.length;)try{I.pop()()}catch(b){c.error(b)}}}function f(a,b){(function nb(){r(D,function(a){a()});y=b(nb,a)})()}function h(){x=null;H!=g.url()&&(H=g.url(),
+r(ca,function(a){a(g.url())}))}var g=this,m=a[0],k=b.location,l=b.history,n=b.setTimeout,q=b.clearTimeout,p={};g.isMock=!1;var u=0,I=[];g.$$completeOutstandingRequest=e;g.$$incOutstandingRequestCount=function(){u++};g.notifyWhenNoOutstandingRequests=function(a){r(D,function(a){a()});0===u?a():I.push(a)};var D=[],y;g.addPollFn=function(a){E(y)&&f(100,n);D.push(a);return a};var H=k.href,J=a.find("base"),x=null;g.url=function(a,c){k!==b.location&&(k=b.location);l!==b.history&&(l=b.history);if(a){if(H!=
+a)return H=a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),J.attr("href",J.attr("href"))):(x=a,c?k.replace(a):k.href=a),g}else return x||k.href.replace(/%27/g,"'")};var ca=[],S=!1;g.onUrlChange=function(a){if(!S){if(d.history)v(b).on("popstate",h);if(d.hashchange)v(b).on("hashchange",h);else g.addPollFn(h);S=!0}ca.push(a);return a};g.baseHref=function(){var a=J.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var N={},Z="",da=g.baseHref();g.cookies=function(a,b){var d,
+e,f,g;if(a)b===s?m.cookie=escape(a)+"=;path="+da+";expires=Thu, 01 Jan 1970 00:00:00 GMT":C(b)&&(d=(m.cookie=escape(a)+"="+escape(b)+";path="+da).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(m.cookie!==Z)for(Z=m.cookie,d=Z.split("; "),N={},f=0;f<d.length;f++)e=d[f],g=e.indexOf("="),0<g&&(a=unescape(e.substring(0,g)),N[a]===s&&(N[a]=unescape(e.substring(g+1))));return N}};g.defer=function(a,b){var c;u++;c=n(function(){delete p[c];
+e(a)},b||0);p[c]=!0;return c};g.defer.cancel=function(a){return p[a]?(delete p[a],q(a),e(z),!0):!1}}function Td(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new we(b,d,a,c)}]}function Ud(){this.$get=function(){function b(b,d){function e(a){a!=n&&(q?q==a&&(q=a.n):q=a,f(a.n,a.p),f(a,n),n=a,n.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw A("$cacheFactory")("iid",b);var h=0,g=t({},d,{id:b}),m={},k=d&&d.capacity||Number.MAX_VALUE,l={},n=null,q=null;
+return a[b]={put:function(a,b){if(k<Number.MAX_VALUE){var c=l[a]||(l[a]={key:a});e(c)}if(!E(b))return a in m||h++,m[a]=b,h>k&&this.remove(q.key),b},get:function(a){if(k<Number.MAX_VALUE){var b=l[a];if(!b)return;e(b)}return m[a]},remove:function(a){if(k<Number.MAX_VALUE){var b=l[a];if(!b)return;b==n&&(n=b.p);b==q&&(q=b.n);f(b.n,b.p);delete l[a]}delete m[a];h--},removeAll:function(){m={};h=0;l={};n=q=null},destroy:function(){l=g=m=null;delete a[b]},info:function(){return t({},g,{size:h})}}}var a={};
+b.info=function(){var b={};r(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function je(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function fc(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,f=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,h=/^<\s*(tr|th|td|thead|tbody|tfoot)(\s+[^>]*)?>/i,g=/^(on[a-z]+|formaction)$/;this.directive=function k(a,e){za(a,"directive");C(a)?(Bb(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+
+d,["$injector","$exceptionHandler",function(b,d){var e=[];r(c[a],function(c,f){try{var g=b.invoke(c);F(g)?g={compile:Y(g)}:!g.compile&&g.link&&(g.compile=Y(g.link));g.priority=g.priority||0;g.index=f;g.name=g.name||a;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){d(h)}});return e}])),c[a].push(e)):r(a,Ub(k));return this};this.aHrefSanitizationWhitelist=function(b){return w(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=
+function(b){return w(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,n,q,p,u,I,D,y,H,J,x){function ca(a,b,c,d,e){a instanceof v||(a=v(a));r(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=v(b).wrap("<span></span>").parent()[0])});var f=N(a,b,a,c,d,e);S(a,"ng-scope");return function(b,
+c,d){Bb(b,"scope");var e=c?Ia.clone.call(a):a;r(d,function(a,b){e.data("$"+b+"Controller",a)});d=0;for(var g=e.length;d<g;d++){var h=e[d].nodeType;1!==h&&9!==h||e.eq(d).data("$scope",b)}c&&c(e,b);f&&f(b,e,e);return e}}function S(a,b){try{a.addClass(b)}catch(c){}}function N(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,n,p,q,u;f=c.length;var ba=Array(f);for(p=0;p<f;p++)ba[p]=c[p];u=p=0;for(q=h.length;p<q;u++)k=ba[u],c=h[p++],f=h[p++],l=v(k),c?(c.scope?(n=a.$new(),l.data("$scope",n)):n=a,(l=c.transclude)||
+!e&&b?c(f,n,k,d,Z(a,l||b)):c(f,n,k,d,e)):f&&f(a,k.childNodes,s,e)}for(var h=[],k,l,n,p,q=0;q<a.length;q++)k=new Jb,l=da(a[q],[],k,0===q?d:s,e),(f=l.length?Xa(l,a[q],k,b,c,null,[],[],f):null)&&f.scope&&S(v(a[q]),"ng-scope"),k=f&&f.terminal||!(n=a[q].childNodes)||!n.length?null:N(n,f?f.transclude:b),h.push(f,k),p=p||f||k,f=null;return p?g:null}function Z(a,b){return function(c,d,e){var f=!1;c||(c=a.$new(),f=c.$$transcluded=!0);d=b(c,d,e);if(f)d.on("$destroy",gb(c,c.$destroy));return d}}function da(a,
+b,c,d,g){var h=c.$attr,k;switch(a.nodeType){case 1:w(b,la(Ja(a).toLowerCase()),"E",d,g);var l,n,p;k=a.attributes;for(var q=0,u=k&&k.length;q<u;q++){var I=!1,D=!1;l=k[q];if(!V||8<=V||l.specified){n=l.name;p=la(n);ma.test(p)&&(n=hb(p.substr(6),"-"));var H=p.replace(/(Start|End)$/,"");p===H+"Start"&&(I=n,D=n.substr(0,n.length-5)+"end",n=n.substr(0,n.length-6));p=la(n.toLowerCase());h[p]=n;c[p]=l=aa(l.value);pc(a,p)&&(c[p]=!0);ha(a,b,l,p);w(b,p,"A",d,g,I,D)}}a=a.className;if(C(a)&&""!==a)for(;k=f.exec(a);)p=
+la(k[2]),w(b,p,"C",d,g)&&(c[p]=aa(k[3])),a=a.substr(k.index+k[0].length);break;case 3:O(b,a.nodeValue);break;case 8:try{if(k=e.exec(a.nodeValue))p=la(k[1]),w(b,p,"M",d,g)&&(c[p]=aa(k[2]))}catch(x){}}b.sort(A);return b}function B(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ia("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return v(d)}function K(a,b,c){return function(d,e,f,g,h){e=B(e[0],
+b,c);return a(d,e,f,g,h)}}function Xa(a,c,d,e,f,g,h,k,p){function q(a,b,c,d){if(a){c&&(a=K(a,c,d));a.require=G.require;if(N===G||G.$$isolateScope)a=sc(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=K(b,c,d));b.require=G.require;if(N===G||G.$$isolateScope)b=sc(b,{isolateScope:!0});k.push(b)}}function D(a,b,c){var d,e="data",f=!1;if(C(a)){for(;"^"==(d=a.charAt(0))||"?"==d;)a=a.substr(1),"^"==d&&(e="inheritedData"),f=f||"?"==d;d=null;c&&"data"===e&&(d=c[a]);d=d||b[e]("$"+a+"Controller");if(!d&&!f)throw ia("ctreq",
+a,ha);}else M(a)&&(d=[],r(a,function(a){d.push(D(a,b,c))}));return d}function H(a,e,f,g,p){function q(a,b){var c;2>arguments.length&&(b=a,a=s);Ka&&(c=da);return p(a,b,c)}var x,ba,y,B,ca,K,da={},w;x=c===f?d:Xb(d,new Jb(v(f),d.$attr));ba=x.$$element;if(N){var xe=/^\s*([@=&])(\??)\s*(\w*)\s*$/;g=v(f);K=e.$new(!0);Z&&Z===N.$$originalDirective?g.data("$isolateScope",K):g.data("$isolateScopeNoTemplate",K);S(g,"ng-isolate-scope");r(N.scope,function(a,c){var d=a.match(xe)||[],f=d[3]||c,g="?"==d[2],d=d[1],
+h,k,n,p;K.$$isolateBindings[c]=d+f;switch(d){case "@":x.$observe(f,function(a){K[c]=a});x.$$observers[f].$$scope=e;x[f]&&(K[c]=b(x[f])(e));break;case "=":if(g&&!x[f])break;k=u(x[f]);p=k.literal?wa:function(a,b){return a===b};n=k.assign||function(){h=K[c]=k(e);throw ia("nonassign",x[f],N.name);};h=K[c]=k(e);K.$watch(function(){var a=k(e);p(a,K[c])||(p(a,h)?n(e,a=K[c]):K[c]=a);return h=a},null,k.literal);break;case "&":k=u(x[f]);K[c]=function(a){return k(e,a)};break;default:throw ia("iscp",N.name,c,
+a);}})}w=p&&q;J&&r(J,function(a){var b={$scope:a===N||a.$$isolateScope?K:e,$element:ba,$attrs:x,$transclude:w},c;ca=a.controller;"@"==ca&&(ca=x[a.name]);c=I(ca,b);da[a.name]=c;Ka||ba.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});g=0;for(y=h.length;g<y;g++)try{B=h[g],B(B.isolateScope?K:e,ba,x,B.require&&D(B.require,ba,da),w)}catch(t){n(t,ga(ba))}g=e;N&&(N.template||null===N.templateUrl)&&(g=K);a&&a(g,f.childNodes,s,p);for(g=k.length-1;0<=g;g--)try{B=k[g],B(B.isolateScope?
+K:e,ba,x,B.require&&D(B.require,ba,da),w)}catch(L){n(L,ga(ba))}}p=p||{};for(var x=-Number.MAX_VALUE,y,J=p.controllerDirectives,N=p.newIsolateScopeDirective,Z=p.templateDirective,w=p.nonTlbTranscludeDirective,Xa=!1,Ka=p.hasElementTranscludeDirective,L=d.$$element=v(c),G,ha,t,A=e,O,ma=0,Q=a.length;ma<Q;ma++){G=a[ma];var T=G.$$start,V=G.$$end;T&&(L=B(c,T,V));t=s;if(x>G.priority)break;if(t=G.scope)y=y||G,G.templateUrl||(R("new/isolated scope",N,G,L),W(t)&&(N=G));ha=G.name;!G.templateUrl&&G.controller&&
+(t=G.controller,J=J||{},R("'"+ha+"' controller",J[ha],G,L),J[ha]=G);if(t=G.transclude)Xa=!0,G.$$tlb||(R("transclusion",w,G,L),w=G),"element"==t?(Ka=!0,x=G.priority,t=B(c,T,V),L=d.$$element=v(U.createComment(" "+ha+": "+d[ha]+" ")),c=L[0],ob(f,v(xa.call(t,0)),c),A=ca(t,e,x,g&&g.name,{nonTlbTranscludeDirective:w})):(t=v(Hb(c)).contents(),L.empty(),A=ca(t,e));if(G.template)if(R("template",Z,G,L),Z=G,t=F(G.template)?G.template(L,d):G.template,t=tc(t),G.replace){g=G;t=E(t);c=t[0];if(1!=t.length||1!==c.nodeType)throw ia("tplrt",
+ha,"");ob(f,L,c);Q={$attr:{}};t=da(c,[],Q);var X=a.splice(ma+1,a.length-(ma+1));N&&nb(t);a=a.concat(t).concat(X);z(d,Q);Q=a.length}else L.html(t);if(G.templateUrl)R("template",Z,G,L),Z=G,G.replace&&(g=G),H=P(a.splice(ma,a.length-ma),L,d,f,A,h,k,{controllerDirectives:J,newIsolateScopeDirective:N,templateDirective:Z,nonTlbTranscludeDirective:w}),Q=a.length;else if(G.compile)try{O=G.compile(L,d,A),F(O)?q(null,O,T,V):O&&q(O.pre,O.post,T,V)}catch(Y){n(Y,ga(L))}G.terminal&&(H.terminal=!0,x=Math.max(x,G.priority))}H.scope=
+y&&!0===y.scope;H.transclude=Xa&&A;p.hasElementTranscludeDirective=Ka;return H}function nb(a){for(var b=0,c=a.length;b<c;b++)a[b]=Wb(a[b],{$$isolateScope:!0})}function w(b,e,f,g,h,l,p){if(e===h)return null;h=null;if(c.hasOwnProperty(e)){var q;e=a.get(e+d);for(var u=0,I=e.length;u<I;u++)try{q=e[u],(g===s||g>q.priority)&&-1!=q.restrict.indexOf(f)&&(l&&(q=Wb(q,{$$start:l,$$end:p})),b.push(q),h=q)}catch(x){n(x)}}return h}function z(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;r(a,function(d,e){"$"!=e.charAt(0)&&
+(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,f){"class"==f?(S(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function E(a){var b;a=aa(a);if(b=h.exec(a)){b=b[1].toLowerCase();a=v("<table>"+a+"</table>");if(/(thead|tbody|tfoot)/.test(b))return a.children(b);a=a.children("tbody");return"tr"===b?a.children("tr"):a.children("tr").contents()}return v("<div>"+
+a+"</div>").contents()}function P(a,b,c,d,e,f,g,h){var k=[],l,n,u=b[0],I=a.shift(),x=t({},I,{templateUrl:null,transclude:null,replace:null,$$originalDirective:I}),D=F(I.templateUrl)?I.templateUrl(b,c):I.templateUrl;b.empty();q.get(H.getTrustedResourceUrl(D),{cache:p}).success(function(p){var q,H;p=tc(p);if(I.replace){p=E(p);q=p[0];if(1!=p.length||1!==q.nodeType)throw ia("tplrt",I.name,D);p={$attr:{}};ob(d,b,q);var y=da(q,[],p);W(I.scope)&&nb(y);a=y.concat(a);z(c,p)}else q=u,b.html(p);a.unshift(x);
+l=Xa(a,q,c,e,b,I,f,g,h);r(d,function(a,c){a==q&&(d[c]=b[0])});for(n=N(b[0].childNodes,e);k.length;){p=k.shift();H=k.shift();var B=k.shift(),J=k.shift(),y=b[0];if(H!==u){var K=H.className;h.hasElementTranscludeDirective&&I.replace||(y=Hb(q));ob(B,v(H),y);S(v(y),K)}H=l.transclude?Z(p,l.transclude):J;l(n,p,y,d,H)}k=null}).error(function(a,b,c,d){throw ia("tpload",d.url);});return function(a,b,c,d,e){k?(k.push(b),k.push(c),k.push(d),k.push(e)):l(n,b,c,d,e)}}function A(a,b){var c=b.priority-a.priority;
+return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function R(a,b,c,d){if(b)throw ia("multidir",b.name,c.name,a,ga(d));}function O(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:Y(function(a,b){var c=b.parent(),e=c.data("$binding")||[];e.push(d);S(c.data("$binding",e),"ng-binding");a.$watch(d,function(a){b[0].nodeValue=a})})})}function Ka(a,b){if("srcdoc"==b)return H.HTML;var c=Ja(a);if("xlinkHref"==b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return H.RESOURCE_URL}
+function ha(a,c,d,e){var f=b(d,!0);if(f){if("multiple"===e&&"SELECT"===Ja(a))throw ia("selmulti",ga(a));c.push({priority:100,compile:function(){return{pre:function(c,d,h){d=h.$$observers||(h.$$observers={});if(g.test(e))throw ia("nodomevents");if(f=b(h[e],!0,Ka(a,e)))h[e]=f(c),(d[e]||(d[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||c).$watch(f,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)})}}}})}}function ob(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=
+0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;break}f&&f.replaceChild(c,d);a=U.createDocumentFragment();a.appendChild(d);c[v.expando]=d[v.expando];d=1;for(e=b.length;d<e;d++)f=b[d],v(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function sc(a,b){return t(function(){return a.apply(null,arguments)},a,b)}var Jb=function(a,b){this.$$element=a;this.$attr=b||{}};Jb.prototype={$normalize:la,$addClass:function(a){a&&0<
+a.length&&J.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&J.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=uc(a,b),d=uc(b,a);0===c.length?J.removeClass(this.$$element,d):0===d.length?J.addClass(this.$$element,c):J.setClass(this.$$element,c,d)},$set:function(a,b,c,d){var e=pc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=hb(a,"-"));e=Ja(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&
+"src"===a)this[a]=b=x(b,"src"===a);!1!==c&&(null===b||b===s?this.$$element.removeAttr(d):this.$$element.attr(d,b));(c=this.$$observers)&&r(c[a],function(a){try{a(b)}catch(c){n(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);D.$evalAsync(function(){e.$$inter||b(c[a])});return function(){Da(e,b)}}};var Q=b.startSymbol(),T=b.endSymbol(),tc="{{"==Q||"}}"==T?Ca:function(a){return a.replace(/\{\{/g,Q).replace(/}}/g,T)},ma=/^ngAttr[A-Z]/;return ca}]}
+function la(b){return Sa(b.replace(ye,""))}function uc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),f=0;a:for(;f<d.length;f++){for(var h=d[f],g=0;g<e.length;g++)if(h==e[g])continue a;c+=(0<c.length?" ":"")+h}return c}function Vd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){za(a,"controller");W(a)?t(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,f){var h,g,m;C(e)&&(h=e.match(a),g=h[1],m=h[3],e=b.hasOwnProperty(g)?b[g]:ec(f.$scope,g,!0)||ec(d,
+g,!0),Qa(e,g,!0));h=c.instantiate(e,f);if(m){if(!f||"object"!=typeof f.$scope)throw A("$controller")("noscp",g||e.name,m);f.$scope[m]=h}return h}}]}function Wd(){this.$get=["$window",function(b){return v(b.document)}]}function Xd(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function vc(b){var a={},c,d,e;if(!b)return a;r(b.split("\n"),function(b){e=b.indexOf(":");c=P(aa(b.substr(0,e)));d=aa(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function wc(b){var a=
+W(b)?b:s;return function(c){a||(a=vc(b));return c?a[P(c)]||null:a}}function xc(b,a,c){if(F(c))return c(b,a);r(c,function(c){b=c(b,a)});return b}function $d(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){C(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=Zb(d)));return d}],transformRequest:[function(a){return W(a)&&"[object File]"!==va.call(a)&&"[object Blob]"!==va.call(a)?qa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
+post:$(d),put:$(d),patch:$(d)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},f=this.interceptors=[],h=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,n,q){function p(a){function c(a){var b=t({},a,{data:xc(a.data,a.headers,d.transformResponse)});return 200<=a.status&&300>a.status?b:n.reject(b)}var d={method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},f=function(a){function b(a){var c;
+r(a,function(b,d){F(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=t({},a.headers),f,g,c=t({},c.common,c[P(a.method)]);b(c);b(d);a:for(f in c){a=P(f);for(g in d)if(P(g)===a)continue a;d[f]=c[f]}return d}(a);t(d,a);d.headers=f;d.method=Ea(d.method);(a=Kb(d.url)?b.cookies()[d.xsrfCookieName||e.xsrfCookieName]:s)&&(f[d.xsrfHeaderName||e.xsrfHeaderName]=a);var g=[function(a){f=a.headers;var b=xc(a.data,wc(f),a.transformRequest);E(a.data)&&r(f,function(a,b){"content-type"===P(b)&&delete f[b]});
+E(a.withCredentials)&&!E(e.withCredentials)&&(a.withCredentials=e.withCredentials);return u(a,b,f).then(c,c)},s],h=n.when(d);for(r(y,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){a=g.shift();var k=g.shift(),h=h.then(a,k)}h.success=function(a){h.then(function(b){a(b.data,b.status,b.headers,d)});return h};h.error=function(a){h.then(null,function(b){a(b.data,b.status,b.headers,d)});return h};
+return h}function u(b,c,f){function h(a,b,c,e){y&&(200<=a&&300>a?y.put(s,[a,b,vc(c),e]):y.remove(s));k(b,a,c,e);d.$$phase||d.$apply()}function k(a,c,d,e){c=Math.max(c,0);(200<=c&&300>c?q.resolve:q.reject)({data:a,status:c,headers:wc(d),config:b,statusText:e})}function m(){var a=fb(p.pendingRequests,b);-1!==a&&p.pendingRequests.splice(a,1)}var q=n.defer(),u=q.promise,y,r,s=I(b.url,b.params);p.pendingRequests.push(b);u.then(m,m);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(y=W(b.cache)?b.cache:
+W(e.cache)?e.cache:D);if(y)if(r=y.get(s),w(r)){if(r.then)return r.then(m,m),r;M(r)?k(r[1],r[0],$(r[2]),r[3]):k(r,200,{},"OK")}else y.put(s,u);E(r)&&a(b.method,s,c,h,f,b.timeout,b.withCredentials,b.responseType);return u}function I(a,b){if(!b)return a;var c=[];Zc(b,function(a,b){null===a||E(a)||(M(a)||(a=[a]),r(a,function(a){W(a)&&(a=qa(a));c.push(ya(b)+"="+ya(a))}))});0<c.length&&(a+=(-1==a.indexOf("?")?"?":"&")+c.join("&"));return a}var D=c("$http"),y=[];r(f,function(a){y.unshift(C(a)?q.get(a):q.invoke(a))});
+r(h,function(a,b){var c=C(a)?q.get(a):q.invoke(a);y.splice(b,0,{response:function(a){return c(n.when(a))},responseError:function(a){return c(n.reject(a))}})});p.pendingRequests=[];(function(a){r(arguments,function(a){p[a]=function(b,c){return p(t(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){p[a]=function(b,c,d){return p(t(d||{},{method:a,url:b,data:c}))}})})("post","put");p.defaults=e;return p}]}function ze(b){if(8>=V&&(!b.match(/^(get|post|head|put|delete|options)$/i)||
+!R.XMLHttpRequest))return new R.ActiveXObject("Microsoft.XMLHTTP");if(R.XMLHttpRequest)return new R.XMLHttpRequest;throw A("$httpBackend")("noxhr");}function ae(){this.$get=["$browser","$window","$document",function(b,a,c){return Ae(b,ze,b.defer,a.angular.callbacks,c[0])}]}function Ae(b,a,c,d,e){function f(a,b,c){var f=e.createElement("script"),h=null;f.type="text/javascript";f.src=a;f.async=!0;h=function(a){Ta(f,"load",h);Ta(f,"error",h);e.body.removeChild(f);f=null;var g=-1,u="unknown";a&&("load"!==
+a.type||d[b].called||(a={type:"error"}),u=a.type,g="error"===a.type?404:200);c&&c(g,u)};pb(f,"load",h);pb(f,"error",h);e.body.appendChild(f);return h}var h=-1;return function(e,m,k,l,n,q,p,u){function I(){y=h;J&&J();x&&x.abort()}function D(a,d,e,f,g){S&&c.cancel(S);J=x=null;0===d&&(d=e?200:"file"==ra(m).protocol?404:0);a(1223===d?204:d,e,f,g||"");b.$$completeOutstandingRequest(z)}var y;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==P(e)){var H="_"+(d.counter++).toString(36);d[H]=function(a){d[H].data=
+a;d[H].called=!0};var J=f(m.replace("JSON_CALLBACK","angular.callbacks."+H),H,function(a,b){D(l,a,d[H].data,"",b);d[H]=z})}else{var x=a(e);x.open(e,m,!0);r(n,function(a,b){w(a)&&x.setRequestHeader(b,a)});x.onreadystatechange=function(){if(x&&4==x.readyState){var a=null,b=null;y!==h&&(a=x.getAllResponseHeaders(),b="response"in x?x.response:x.responseText);D(l,y||x.status,b,a,x.statusText||"")}};p&&(x.withCredentials=!0);if(u)try{x.responseType=u}catch(s){if("json"!==u)throw s;}x.send(k||null)}if(0<
+q)var S=c(I,q);else q&&q.then&&q.then(I)}}function Yd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(f,k,l){for(var n,q,p=0,u=[],I=f.length,D=!1,y=[];p<I;)-1!=(n=f.indexOf(b,p))&&-1!=(q=f.indexOf(a,n+h))?(p!=n&&u.push(f.substring(p,n)),u.push(p=c(D=f.substring(n+h,q))),p.exp=D,p=q+g,D=!0):(p!=I&&u.push(f.substring(p)),p=I);(I=u.length)||(u.push(""),I=
+1);if(l&&1<u.length)throw yc("noconcat",f);if(!k||D)return y.length=I,p=function(a){try{for(var b=0,c=I,g;b<c;b++)"function"==typeof(g=u[b])&&(g=g(a),g=l?e.getTrusted(l,g):e.valueOf(g),null===g||E(g)?g="":"string"!=typeof g&&(g=qa(g))),y[b]=g;return y.join("")}catch(h){a=yc("interr",f,h.toString()),d(a)}},p.exp=f,p.parts=u,p}var h=b.length,g=a.length;f.startSymbol=function(){return b};f.endSymbol=function(){return a};return f}]}function Zd(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,
+h,g,m){var k=a.setInterval,l=a.clearInterval,n=c.defer(),q=n.promise,p=0,u=w(m)&&!m;g=w(g)?g:0;q.then(null,null,d);q.$$intervalId=k(function(){n.notify(p++);0<g&&p>=g&&(n.resolve(p),l(q.$$intervalId),delete e[q.$$intervalId]);u||b.$apply()},h);e[q.$$intervalId]=n;return q}var e={};d.cancel=function(a){return a&&a.$$intervalId in e?(e[a.$$intervalId].reject("canceled"),clearInterval(a.$$intervalId),delete e[a.$$intervalId],!0):!1};return d}]}function hd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",
+GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
+SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function zc(b){b=b.split("/");for(var a=b.length;a--;)b[a]=Ab(b[a]);return b.join("/")}function Ac(b,a,c){b=ra(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=Q(b.port)||Be[b.protocol]||null}
+function Bc(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ra(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=ac(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function na(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Ya(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Lb(b){return b.substr(0,Ya(b).lastIndexOf("/")+1)}function Cc(b,a){this.$$html5=!0;a=a||
+"";var c=Lb(b);Ac(b,this,b);this.$$parse=function(a){var e=na(c,a);if(!C(e))throw Mb("ipthprfx",a,c);Bc(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=bc(this.$$search),b=this.$$hash?"#"+Ab(this.$$hash):"";this.$$url=zc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;if((e=na(b,d))!==s)return d=e,(e=na(a,e))!==s?c+(na("/",e)||e):b+d;if((e=na(c,d))!==s)return c+e;if(c==d+"/")return c}}function Nb(b,a){var c=
+Lb(b);Ac(b,this,b);this.$$parse=function(d){var e=na(b,d)||na(c,d),e="#"==e.charAt(0)?na(a,e):this.$$html5?e:"";if(!C(e))throw Mb("ihshprfx",d,a);Bc(e,this,b);d=this.$$path;var f=/^\/?.*?:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=bc(this.$$search),e=this.$$hash?"#"+Ab(this.$$hash):"";this.$$url=zc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(Ya(b)==
+Ya(a))return a}}function Dc(b,a){this.$$html5=!0;Nb.apply(this,arguments);var c=Lb(b);this.$$rewrite=function(d){var e;if(b==Ya(d))return d;if(e=na(c,d))return b+a+e;if(c===d+"/")return c}}function qb(b){return function(){return this[b]}}function Ec(b,a){return function(c){if(E(c))return this[b];this[b]=a(c);this.$$compose();return this}}function be(){var b="",a=!1;this.hashPrefix=function(a){return w(a)?(b=a,this):b};this.html5Mode=function(b){return w(b)?(a=b,this):a};this.$get=["$rootScope","$browser",
+"$sniffer","$rootElement",function(c,d,e,f){function h(a){c.$broadcast("$locationChangeSuccess",g.absUrl(),a)}var g,m=d.baseHref(),k=d.url();a?(m=k.substring(0,k.indexOf("/",k.indexOf("//")+2))+(m||"/"),e=e.history?Cc:Dc):(m=Ya(k),e=Nb);g=new e(m,"#"+b);g.$$parse(g.$$rewrite(k));f.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var b=v(a.target);"a"!==P(b[0].nodeName);)if(b[0]===f[0]||!(b=b.parent())[0])return;var e=b.prop("href");W(e)&&"[object SVGAnimatedString]"===e.toString()&&
+(e=ra(e.animVal).href);var h=g.$$rewrite(e);e&&(!b.attr("target")&&h&&!a.isDefaultPrevented())&&(a.preventDefault(),h!=d.url()&&(g.$$parse(h),c.$apply(),R.angular["ff-684208-preventDefault"]=!0))}});g.absUrl()!=k&&d.url(g.absUrl(),!0);d.onUrlChange(function(a){g.absUrl()!=a&&(c.$evalAsync(function(){var b=g.absUrl();g.$$parse(a);c.$broadcast("$locationChangeStart",a,b).defaultPrevented?(g.$$parse(b),d.url(b)):h(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=g.$$replace;
+l&&a==g.absUrl()||(l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",g.absUrl(),a).defaultPrevented?g.$$parse(a):(d.url(g.absUrl(),b),h(a))}));g.$$replace=!1;return l});return g}]}function ce(){var b=!0,a=this;this.debugEnabled=function(a){return w(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}
+function e(a){var b=c.console||{},e=b[a]||b.log||z;a=!1;try{a=!!e.apply}catch(m){}return a?function(){var a=[];r(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ea(b,a){if("constructor"===b)throw Aa("isecfld",a);return b}function Za(b,a){if(b){if(b.constructor===b)throw Aa("isecfn",a);if(b.document&&
+b.location&&b.alert&&b.setInterval)throw Aa("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw Aa("isecdom",a);}return b}function rb(b,a,c,d,e){e=e||{};a=a.split(".");for(var f,h=0;1<a.length;h++){f=ea(a.shift(),d);var g=b[f];g||(g={},b[f]=g);b=g;b.then&&e.unwrapPromises&&(sa(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===s&&(b.$$v={}),b=b.$$v)}f=ea(a.shift(),d);return b[f]=c}function Fc(b,a,c,d,e,f,h){ea(b,f);ea(a,f);ea(c,f);ea(d,f);ea(e,f);return h.unwrapPromises?
+function(g,h){var k=h&&h.hasOwnProperty(b)?h:g,l;if(null==k)return k;(k=k[b])&&k.then&&(sa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!a)return k;if(null==k)return s;(k=k[a])&&k.then&&(sa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!c)return k;if(null==k)return s;(k=k[c])&&k.then&&(sa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!d)return k;if(null==k)return s;(k=k[d])&&k.then&&(sa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=
+a})),k=k.$$v);if(!e)return k;if(null==k)return s;(k=k[e])&&k.then&&(sa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);return k}:function(f,h){var k=h&&h.hasOwnProperty(b)?h:f;if(null==k)return k;k=k[b];if(!a)return k;if(null==k)return s;k=k[a];if(!c)return k;if(null==k)return s;k=k[c];if(!d)return k;if(null==k)return s;k=k[d];return e?null==k?s:k=k[e]:k}}function Ce(b,a){ea(b,a);return function(a,d){return null==a?s:(d&&d.hasOwnProperty(b)?d:a)[b]}}function De(b,a,c){ea(b,c);ea(a,
+c);return function(c,e){if(null==c)return s;c=(e&&e.hasOwnProperty(b)?e:c)[b];return null==c?s:c[a]}}function Gc(b,a,c){if(Ob.hasOwnProperty(b))return Ob[b];var d=b.split("."),e=d.length,f;if(a.unwrapPromises||1!==e)if(a.unwrapPromises||2!==e)if(a.csp)f=6>e?Fc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,f){var g=0,h;do h=Fc(d[g++],d[g++],d[g++],d[g++],d[g++],c,a)(b,f),f=s,b=h;while(g<e);return h};else{var h="var p;\n";r(d,function(b,d){ea(b,c);h+="if(s == null) return undefined;\ns="+(d?"s":'((k&&k.hasOwnProperty("'+
+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")});var h=h+"return s;",g=new Function("s","k","pw",h);g.toString=Y(h);f=a.unwrapPromises?function(a,b){return g(a,b,sa)}:g}else f=De(d[0],d[1],c);else f=Ce(d[0],c);"hasOwnProperty"!==b&&(Ob[b]=f);return f}function de(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=
+function(b){return w(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return w(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log",function(c,d,e){a.csp=d.csp;sa=function(b){a.logPromiseWarnings&&!Hc.hasOwnProperty(b)&&(Hc[b]=!0,e.warn("[$parse] Promise found in the expression `"+b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];
+e=new Pb(a);e=(new $a(e,c,a)).parse(d,!1);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return z}}}]}function fe(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Ee(function(a){b.$evalAsync(a)},a)}]}function Ee(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var h=[],k,l;return l={resolve:function(a){if(h){var c=h;h=s;k=f(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],k.then(a[0],a[1],a[2])})}},reject:function(a){l.resolve(g(a))},
+notify:function(a){if(h){var c=h;h.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,f,g){var l=e(),I=function(d){try{l.resolve((F(b)?b:c)(d))}catch(e){l.reject(e),a(e)}},D=function(b){try{l.resolve((F(f)?f:d)(b))}catch(c){l.reject(c),a(c)}},y=function(b){try{l.notify((F(g)?g:c)(b))}catch(d){a(d)}};h?h.push([I,D,y]):k.then(I,D,y);return l.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):
+d.reject(a);return d.promise}function d(e,f){var g=null;try{g=(a||c)()}catch(h){return b(h,!1)}return g&&F(g.then)?g.then(function(){return b(e,f)},function(a){return b(a,!1)}):b(e,f)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},f=function(a){return a&&F(a.then)?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},h=function(a){var b=e();b.reject(a);return b.promise},g=function(c){return{then:function(f,g){var h=e();b(function(){try{h.resolve((F(g)?
+g:d)(c))}catch(b){h.reject(b),a(b)}});return h.promise}}};return{defer:e,reject:h,when:function(g,k,l,n){var q=e(),p,u=function(b){try{return(F(k)?k:c)(b)}catch(d){return a(d),h(d)}},I=function(b){try{return(F(l)?l:d)(b)}catch(c){return a(c),h(c)}},D=function(b){try{return(F(n)?n:c)(b)}catch(d){a(d)}};b(function(){f(g).then(function(a){p||(p=!0,q.resolve(f(a).then(u,I,D)))},function(a){p||(p=!0,q.resolve(I(a)))},function(a){p||q.notify(D(a))})});return q.promise},all:function(a){var b=e(),c=0,d=M(a)?
+[]:{};r(a,function(a,e){c++;f(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}function me(){this.$get=["$window","$timeout",function(b,a){var c=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame,d=b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:
+function(b){var c=a(b,16.66,!1);return function(){a.cancel(c)}};f.supported=e;return f}]}function ee(){var b=10,a=A("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,e,f,h){function g(){this.$id=db();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=
+[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}}function m(b){if(q.$$phase)throw a("inprog",q.$$phase);q.$$phase=b}function k(a,b){var c=f(a);Qa(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}g.prototype={constructor:g,$new:function(a){a?(a=new g,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(a=function(){},a.prototype=this,a=
+new a,a.$id=db());a["this"]=a;a.$$listeners={};a.$$listenerCount={};a.$parent=this;a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,d){var e=k(a,"watch"),f=this.$$watchers,g={fn:b,last:n,get:e,exp:a,eq:!!d};c=null;if(!F(b)){var h=k(b||z,"listener");g.fn=function(a,b,c){h(c)}}if("string"==typeof a&&e.constant){var m=g.fn;
+g.fn=function(a,b,c){m.call(this,a,b,c);Da(f,g)}}f||(f=this.$$watchers=[]);f.unshift(g);return function(){Da(f,g);c=null}},$watchCollection:function(a,b){var c=this,d,e,g,h=1<b.length,k=0,m=f(a),l=[],n={},q=!0,r=0;return this.$watch(function(){d=m(c);var a,b;if(W(d))if(cb(d))for(e!==l&&(e=l,r=e.length=0,k++),a=d.length,r!==a&&(k++,e.length=r=a),b=0;b<a;b++)e[b]!==e[b]&&d[b]!==d[b]||e[b]===d[b]||(k++,e[b]=d[b]);else{e!==n&&(e=n={},r=0,k++);a=0;for(b in d)d.hasOwnProperty(b)&&(a++,e.hasOwnProperty(b)?
+e[b]!==d[b]&&(k++,e[b]=d[b]):(r++,e[b]=d[b],k++));if(r>a)for(b in k++,e)e.hasOwnProperty(b)&&!d.hasOwnProperty(b)&&(r--,delete e[b])}else e!==d&&(e=d,k++);return k},function(){q?(q=!1,b(d,d,c)):b(d,g,c);if(h)if(W(d))if(cb(d)){g=Array(d.length);for(var a=0;a<d.length;a++)g[a]=d[a]}else for(a in g={},d)Qb.call(d,a)&&(g[a]=d[a]);else g=d})},$digest:function(){var d,f,g,h,k=this.$$asyncQueue,l=this.$$postDigestQueue,r,x,s=b,S,N=[],w,t,B;m("$digest");c=null;do{x=!1;for(S=this;k.length;){try{B=k.shift(),
+B.scope.$eval(B.expression)}catch(v){q.$$phase=null,e(v)}c=null}a:do{if(h=S.$$watchers)for(r=h.length;r--;)try{if(d=h[r])if((f=d.get(S))!==(g=d.last)&&!(d.eq?wa(f,g):"number"==typeof f&&"number"==typeof g&&isNaN(f)&&isNaN(g)))x=!0,c=d,d.last=d.eq?$(f):f,d.fn(f,g===n?f:g,S),5>s&&(w=4-s,N[w]||(N[w]=[]),t=F(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,t+="; newVal: "+qa(f)+"; oldVal: "+qa(g),N[w].push(t));else if(d===c){x=!1;break a}}catch(C){q.$$phase=null,e(C)}if(!(h=S.$$childHead||S!==this&&
+S.$$nextSibling))for(;S!==this&&!(h=S.$$nextSibling);)S=S.$parent}while(S=h);if((x||k.length)&&!s--)throw q.$$phase=null,a("infdig",b,qa(N));}while(x||k.length);for(q.$$phase=null;l.length;)try{l.shift()()}catch(z){e(z)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(this!==q){r(this.$$listenerCount,gb(null,l,this));a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&
+(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);for(var b in this)Qb.call(this,b)&&(this[b]=null);this.$$destroyed=!0}}},$eval:function(a,b){return f(a)(this,b)},$evalAsync:function(a){q.$$phase||q.$$asyncQueue.length||h.defer(function(){q.$$asyncQueue.length&&q.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return m("$apply"),
+this.$eval(a)}catch(b){e(b)}finally{q.$$phase=null;try{q.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[fb(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},
+k=[h].concat(xa.call(arguments,1)),l,m;do{d=f.$$listeners[a]||c;h.currentScope=f;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){e(n)}else d.splice(l,1),l--,m--;if(g)break;f=f.$parent}while(f);return h},$broadcast:function(a,b){for(var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(xa.call(arguments,1)),h,k;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,
+g)}catch(l){e(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return f}};var q=new g;return q}]}function id(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file|blob):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,f;if(!V||
+8<=V)if(f=ra(c).href,""!==f&&!f.match(e))return"unsafe:"+f;return c}}}function Fe(b){if("self"===b)return b;if(C(b)){if(-1<b.indexOf("***"))throw ta("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(eb(b))return RegExp("^"+b.source+"$");throw ta("imatcher");}function Ic(b){var a=[];w(b)&&r(b,function(b){a.push(Fe(b))});return a}function he(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];
+this.resourceUrlWhitelist=function(a){arguments.length&&(b=Ic(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=Ic(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw ta("unsafe");};c.has("$sanitize")&&
+(e=c.get("$sanitize"));var f=d(),h={};h[fa.HTML]=d(f);h[fa.CSS]=d(f);h[fa.URL]=d(f);h[fa.JS]=d(f);h[fa.RESOURCE_URL]=d(h[fa.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw ta("icontext",a,b);if(null===b||b===s||""===b)return b;if("string"!==typeof b)throw ta("itype",a);return new c(b)},getTrusted:function(c,d){if(null===d||d===s||""===d)return d;var f=h.hasOwnProperty(c)?h[c]:null;if(f&&d instanceof f)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var f=
+ra(d.toString()),l,n,q=!1;l=0;for(n=b.length;l<n;l++)if("self"===b[l]?Kb(f):b[l].exec(f.href)){q=!0;break}if(q)for(l=0,n=a.length;l<n;l++)if("self"===a[l]?Kb(f):a[l].exec(f.href)){q=!1;break}if(q)return d;throw ta("insecurl",d.toString());}if(c===fa.HTML)return e(d);throw ta("unsafe");},valueOf:function(a){return a instanceof f?a.$$unwrapTrustedValue():a}}}]}function ge(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,
+c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw ta("iequirks");var e=$(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Ca);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var f=e.parseAs,h=e.getTrusted,g=e.trustAs;r(fa,function(a,b){var c=P(b);e[Sa("parse_as_"+c)]=function(b){return f(a,b)};e[Sa("get_trusted_"+c)]=function(b){return h(a,
+b)};e[Sa("trust_as_"+c)]=function(b){return g(a,b)}});return e}]}function ie(){this.$get=["$window","$document",function(b,a){var c={},d=Q((/android (\d+)/.exec(P((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},h=f.documentMode,g,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,n=!1;if(k){for(var q in k)if(l=m.exec(q)){g=l[0];g=g.substr(0,1).toUpperCase()+g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in
+k);n=!!("animation"in k||g+"Animation"in k);!d||l&&n||(l=C(f.body.style.webkitTransition),n=C(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!h||7<h),hasEvent:function(a){if("input"==a&&9==V)return!1;if(E(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:Yb(),vendorPrefix:g,transitions:l,animations:n,android:d,msie:V,msieDocumentMode:h}}]}function ke(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",
+function(b,a,c,d){function e(e,g,m){var k=c.defer(),l=k.promise,n=w(m)&&!m;g=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}finally{delete f[l.$$timeoutId]}n||b.$apply()},g);l.$$timeoutId=g;f[g]=k;return l}var f={};e.cancel=function(b){return b&&b.$$timeoutId in f?(f[b.$$timeoutId].reject("canceled"),delete f[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ra(b,a){var c=b;V&&(T.setAttribute("href",c),c=T.href);T.setAttribute("href",c);return{href:T.href,protocol:T.protocol?
+T.protocol.replace(/:$/,""):"",host:T.host,search:T.search?T.search.replace(/^\?/,""):"",hash:T.hash?T.hash.replace(/^#/,""):"",hostname:T.hostname,port:T.port,pathname:"/"===T.pathname.charAt(0)?T.pathname:"/"+T.pathname}}function Kb(b){b=C(b)?ra(b):b;return b.protocol===Jc.protocol&&b.host===Jc.host}function le(){this.$get=Y(R)}function jc(b){function a(d,e){if(W(d)){var f={};r(d,function(b,c){f[c]=a(c,b)});return f}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+
+c)}}];a("currency",Kc);a("date",Lc);a("filter",Ge);a("json",He);a("limitTo",Ie);a("lowercase",Je);a("number",Mc);a("orderBy",Nc);a("uppercase",Ke)}function Ge(){return function(b,a,c){if(!M(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&(c="boolean"===d&&c?function(a,b){return Pa.equals(a,b)}:function(a,b){if(a&&b&&"object"===typeof a&&"object"===typeof b){for(var d in a)if("$"!==d.charAt(0)&&Qb.call(a,d)&&c(a[d],b[d]))return!0;
+return!1}b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var f=function(a,b){if("string"==typeof b&&"!"===b.charAt(0))return!f(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&f(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(f(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a=
+{$:a};case "object":for(var h in a)(function(b){"undefined"!=typeof a[b]&&e.push(function(c){return f("$"==b?c:c&&c[b],a[b])})})(h);break;case "function":e.push(a);break;default:return b}d=[];for(h=0;h<b.length;h++){var g=b[h];e.check(g)&&d.push(g)}return d}}function Kc(b){var a=b.NUMBER_FORMATS;return function(b,d){E(d)&&(d=a.CURRENCY_SYM);return Oc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Mc(b){var a=b.NUMBER_FORMATS;return function(b,d){return Oc(b,a.PATTERNS[0],
+a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Oc(b,a,c,d,e){if(null==b||!isFinite(b)||W(b))return"";var f=0>b;b=Math.abs(b);var h=b+"",g="",m=[],k=!1;if(-1!==h.indexOf("e")){var l=h.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?h="0":(g=h,k=!0)}if(k)0<e&&(-1<b&&1>b)&&(g=b.toFixed(e));else{h=(h.split(Pc)[1]||"").length;E(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));h=Math.pow(10,e);b=Math.round(b*h)/h;b=(""+b).split(Pc);h=b[0];b=b[1]||"";var l=0,n=a.lgSize,q=a.gSize;if(h.length>=n+q)for(l=h.length-
+n,k=0;k<l;k++)0===(l-k)%q&&0!==k&&(g+=c),g+=h.charAt(k);for(k=l;k<h.length;k++)0===(h.length-k)%n&&0!==k&&(g+=c),g+=h.charAt(k);for(;b.length<e;)b+="0";e&&"0"!==e&&(g+=d+b.substr(0,e))}m.push(f?a.negPre:a.posPre);m.push(g);m.push(f?a.negSuf:a.posSuf);return m.join("")}function sb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function X(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return sb(e,a,d)}}
+function tb(b,a){return function(c,d){var e=c["get"+b](),f=Ea(a?"SHORT"+b:b);return d[f][e]}}function Qc(b){var a=(new Date(b,0,1)).getDay();return new Date(b,0,(4>=a?5:12)-a)}function Rc(b){return function(a){var c=Qc(a.getFullYear());a=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))-+c;a=1+Math.round(a/6048E5);return sb(a,b)}}function Lc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,h=0,g=b[8]?a.setUTCFullYear:a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&
+(f=Q(b[9]+b[10]),h=Q(b[9]+b[11]));g.call(a,Q(b[1]),Q(b[2])-1,Q(b[3]));f=Q(b[4]||0)-f;h=Q(b[5]||0)-h;g=Q(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,f,h,g,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var f="",h=[],g,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;C(c)&&(c=Le.test(c)?Q(c):a(c));zb(c)&&(c=new Date(c));if(!pa(c))return c;for(;e;)(m=Me.exec(e))?(h=h.concat(xa.call(m,1)),e=
+h.pop()):(h.push(e),e=null);r(h,function(a){g=Ne[a];f+=g?g(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return f}}function He(){return function(b){return qa(b,!0)}}function Ie(){return function(b,a){if(!M(b)&&!C(b))return b;a=Q(a);if(C(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Nc(b){return function(a,c,d){function e(a,
+b){return Oa(b)?function(b,c){return a(c,b)}:a}function f(a,b){var c=typeof a,d=typeof b;return c==d?("string"==c&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b?0:a<b?-1:1):c<d?-1:1}if(!M(a)||!c)return a;c=M(c)?c:[c];c=ad(c,function(a){var c=!1,d=a||Ca;if(C(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a);if(d.constant){var g=d();return e(function(a,b){return f(a[g],b[g])},c)}}return e(function(a,b){return f(d(a),d(b))},c)});for(var h=[],g=0;g<a.length;g++)h.push(a[g]);
+return h.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function ua(b){F(b)&&(b={link:b});b.restrict=b.restrict||"AC";return Y(b)}function Sc(b,a,c,d){function e(a,c){c=c?"-"+hb(c,"-"):"";d.removeClass(b,(a?ub:vb)+c);d.addClass(b,(a?vb:ub)+c)}var f=this,h=b.parent().controller("form")||wb,g=0,m=f.$error={},k=[];f.$name=a.name||a.ngForm;f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;h.$addControl(f);b.addClass(La);e(!0);f.$addControl=function(a){za(a.$name,
+"input");k.push(a);a.$name&&(f[a.$name]=a)};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];r(m,function(b,c){f.$setValidity(c,!0,a)});Da(k,a)};f.$setValidity=function(a,b,c){var d=m[a];if(b)d&&(Da(d,c),d.length||(g--,g||(e(b),f.$valid=!0,f.$invalid=!1),m[a]=!1,e(!0,a),h.$setValidity(a,!0,f)));else{g||e(b);if(d){if(-1!=fb(d,c))return}else m[a]=d=[],g++,e(!1,a),h.$setValidity(a,!1,f);d.push(c);f.$valid=!1;f.$invalid=!0}};f.$setDirty=function(){d.removeClass(b,La);d.addClass(b,
+xb);f.$dirty=!0;f.$pristine=!1;h.$setDirty()};f.$setPristine=function(){d.removeClass(b,xb);d.addClass(b,La);f.$dirty=!1;f.$pristine=!0;r(k,function(a){a.$setPristine()})}}function oa(b,a,c,d){b.$setValidity(a,c);return c?d:s}function Oe(b,a,c){var d=c.prop("validity");W(d)&&b.$parsers.push(function(c){if(b.$error[a]||!(d.badInput||d.customError||d.typeMismatch)||d.valueMissing)return c;b.$setValidity(a,!1)})}function ab(b,a,c,d,e,f){var h=a.prop("validity");if(!e.android){var g=!1;a.on("compositionstart",
+function(a){g=!0});a.on("compositionend",function(){g=!1;m()})}var m=function(){if(!g){var e=a.val();Oa(c.ngTrim||"T")&&(e=aa(e));if(d.$viewValue!==e||h&&""===e&&!h.valueMissing)b.$$phase?d.$setViewValue(e):b.$apply(function(){d.$setViewValue(e)})}};if(e.hasEvent("input"))a.on("input",m);else{var k,l=function(){k||(k=f.defer(function(){m();k=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||37<=a&&40>=a)||l()});if(e.hasEvent("paste"))a.on("paste cut",l)}a.on("change",m);d.$render=
+function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var n=c.ngPattern;n&&((e=n.match(/^\/(.*)\/([gim]*)$/))?(n=RegExp(e[1],e[2]),e=function(a){return oa(d,"pattern",d.$isEmpty(a)||n.test(a),a)}):e=function(c){var e=b.$eval(n);if(!e||!e.test)throw A("ngPattern")("noregexp",n,e,ga(a));return oa(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var q=Q(c.ngMinlength);e=function(a){return oa(d,"minlength",d.$isEmpty(a)||a.length>=q,a)};d.$parsers.push(e);
+d.$formatters.push(e)}if(c.ngMaxlength){var p=Q(c.ngMaxlength);e=function(a){return oa(d,"maxlength",d.$isEmpty(a)||a.length<=p,a)};d.$parsers.push(e);d.$formatters.push(e)}}function yb(b,a){return function(c){var d;return pa(c)?c:C(c)&&(b.lastIndex=0,c=b.exec(c))?(c.shift(),d={yyyy:0,MM:1,dd:1,HH:0,mm:0},r(c,function(b,c){c<a.length&&(d[a[c]]=+b)}),new Date(d.yyyy,d.MM-1,d.dd,d.HH,d.mm)):NaN}}function bb(b,a,c,d){return function(e,f,h,g,m,k,l){ab(e,f,h,g,m,k);g.$parsers.push(function(d){if(g.$isEmpty(d))return g.$setValidity(b,
+!0),null;if(a.test(d))return g.$setValidity(b,!0),c(d);g.$setValidity(b,!1);return s});g.$formatters.push(function(a){return pa(a)?l("date")(a,d):""});h.min&&(e=function(a){var b=g.$isEmpty(a)||c(a)>=c(h.min);g.$setValidity("min",b);return b?a:s},g.$parsers.push(e),g.$formatters.push(e));h.max&&(e=function(a){var b=g.$isEmpty(a)||c(a)<=c(h.max);g.$setValidity("max",b);return b?a:s},g.$parsers.push(e),g.$formatters.push(e))}}function Rb(b,a){b="ngClass"+b;return function(){return{restrict:"AC",link:function(c,
+d,e){function f(b){if(!0===a||c.$index%2===a){var d=h(b||"");g?wa(b,g)||e.$updateClass(d,h(g)):e.$addClass(d)}g=$(b)}function h(a){if(M(a))return a.join(" ");if(W(a)){var b=[];r(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var g;c.$watch(e[b],f,!0);e.$observe("class",function(a){f(c.$eval(e[b]))});"ngClass"!==b&&c.$watch("$index",function(d,f){var g=d&1;if(g!==f&1){var n=h(c.$eval(e[b]));g===a?e.$addClass(n):e.$removeClass(n)}})}}}}var P=function(b){return C(b)?b.toLowerCase():b},Qb=
+Object.prototype.hasOwnProperty,Ea=function(b){return C(b)?b.toUpperCase():b},V,v,Fa,xa=[].slice,Pe=[].push,va=Object.prototype.toString,Na=A("ng"),Pa=R.angular||(R.angular={}),Ra,Ja,ja=["0","0","0"];V=Q((/msie (\d+)/.exec(P(navigator.userAgent))||[])[1]);isNaN(V)&&(V=Q((/trident\/.*; rv:(\d+)/.exec(P(navigator.userAgent))||[])[1]));z.$inject=[];Ca.$inject=[];var aa=function(){return String.prototype.trim?function(b){return C(b)?b.trim():b}:function(b){return C(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,
+""):b}}();Ja=9>V?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ea(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var dd=/[A-Z]/g,gd={full:"1.3.0-beta.4",major:1,minor:3,dot:0,codeName:"inconspicuous-deception"},Ua=O.cache={},ib=O.expando="ng-"+(new Date).getTime(),qe=1,pb=R.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Ta=R.document.removeEventListener?function(b,
+a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)};O._data=function(b){return this.cache[b[this.expando]]||{}};var oe=/([\:\-\_]+(.))/g,pe=/^moz([A-Z])/,Fb=A("jqLite"),Ia=O.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===U.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),O(R).on("load",a))},toString:function(){var b=[];r(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?v(this[b]):v(this[this.length+
+b])},length:0,push:Pe,sort:[].sort,splice:[].splice},mb={};r("multiple selected checked disabled readOnly required open".split(" "),function(b){mb[P(b)]=b});var qc={};r("input select option textarea button form details".split(" "),function(b){qc[Ea(b)]=!0});r({data:mc,inheritedData:lb,scope:function(b){return v(b).data("$scope")||lb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return v(b).data("$isolateScope")||v(b).data("$isolateScopeNoTemplate")},controller:nc,injector:function(b){return lb(b,
+"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ib,css:function(b,a,c){a=Sa(a);if(w(c))b.style[a]=c;else{var d;8>=V&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=V&&(d=""===d?s:d);return d}},attr:function(b,a,c){var d=P(a);if(mb[d])if(w(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||z).specified?d:s;else if(w(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,
+2),null===b?s:b},prop:function(b,a,c){if(w(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(E(d))return e?b[e]:"";b[e]=d}var a=[];9>V?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(E(a)){if("SELECT"===Ja(b)&&b.multiple){var c=[];r(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(E(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<
+d.length;c++)Ga(d[c]);b.innerHTML=a},empty:oc},function(b,a){O.prototype[a]=function(a,d){var e,f;if(b!==oc&&(2==b.length&&b!==Ib&&b!==nc?a:d)===s){if(W(a)){for(e=0;e<this.length;e++)if(b===mc)b(this[e],a);else for(f in a)b(this[e],f,a[f]);return this}e=b.$dv;f=e===s?Math.min(this.length,1):this.length;for(var h=0;h<f;h++){var g=b(this[h],a,d);e=e?e+g:g}return e}for(e=0;e<this.length;e++)b(this[e],a,d);return this}});r({removeData:kc,dealoc:Ga,on:function a(c,d,e,f){if(w(f))throw Fb("onargs");var h=
+ka(c,"events"),g=ka(c,"handle");h||ka(c,"events",h={});g||ka(c,"handle",g=re(c,h));r(d.split(" "),function(d){var f=h[d];if(!f){if("mouseenter"==d||"mouseleave"==d){var l=U.body.contains||U.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};h[d]=[];a(c,{mouseleave:"mouseout",
+mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||g(a,d)})}else pb(c,d,g),h[d]=[];f=h[d]}f.push(e)})},off:lc,one:function(a,c,d){a=v(a);a.on(c,function f(){a.off(c,d);a.off(c,f)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;Ga(a);r(new O(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];r(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.contentDocument||
+a.childNodes||[]},append:function(a,c){r(new O(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d=a.firstChild;r(new O(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=v(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Ga(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;r(new O(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:kb,removeClass:jb,
+toggleClass:function(a,c,d){c&&r(c.split(" "),function(c){var f=d;E(f)&&(f=!Ib(a,c));(f?kb:jb)(a,c)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Hb,triggerHandler:function(a,c,d){c=(ka(a,"events")||{})[c];d=d||[];var e=[{preventDefault:z,stopPropagation:z}];
+r(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){O.prototype[c]=function(c,e,f){for(var h,g=0;g<this.length;g++)E(h)?(h=a(this[g],c,e,f),w(h)&&(h=v(h))):Gb(h,a(this[g],c,e,f));return w(h)?h:this};O.prototype.bind=O.prototype.on;O.prototype.unbind=O.prototype.off});Va.prototype={put:function(a,c){this[Ha(a)]=c},get:function(a){return this[Ha(a)]},remove:function(a){var c=this[a=Ha(a)];delete this[a];return c}};var te=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,ue=/,/,ve=/^\s*(_?)(\S+?)\1\s*$/,se=
+/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Wa=A("$injector"),Qe=A("$animate"),Sd=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Qe("notcsel",c);this.$$selectors[c.substr(1)]=e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout","$$asyncCallback",function(a,d){return{enter:function(a,c,h,g){h?h.after(a):(c&&c[0]||
+(c=h.parent()),c.append(a));g&&d(g)},leave:function(a,c){a.remove();c&&d(c)},move:function(a,c,d,g){this.enter(a,c,d,g)},addClass:function(a,c,h){c=C(c)?c:M(c)?c.join(" "):"";r(a,function(a){kb(a,c)});h&&d(h)},removeClass:function(a,c,h){c=C(c)?c:M(c)?c.join(" "):"";r(a,function(a){jb(a,c)});h&&d(h)},setClass:function(a,c,h,g){r(a,function(a){kb(a,c);jb(a,h)});g&&d(g)},enabled:z}}]}],ia=A("$compile");fc.$inject=["$provide","$$sanitizeUriProvider"];var ye=/^(x[\:\-_]|data[\:\-_])/i,yc=A("$interpolate"),
+Re=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Be={http:80,https:443,ftp:21},Mb=A("$location");Dc.prototype=Nb.prototype=Cc.prototype={$$html5:!1,$$replace:!1,absUrl:qb("$$absUrl"),url:function(a,c){if(E(a))return this.$$url;var d=Re.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:qb("$$protocol"),host:qb("$$host"),port:qb("$$port"),path:Ec("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;
+case 1:if(C(a))this.$$search=ac(a);else if(W(a))this.$$search=a;else throw Mb("isrcharg");break;default:E(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:Ec("$$hash",Ca),replace:function(){this.$$replace=!0;return this}};var Aa=A("$parse"),Hc={},sa,Ma={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:z,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return w(d)?w(e)?d+e:d:w(e)?e:s},"-":function(a,c,d,e){d=d(a,c);e=
+e(a,c);return(w(d)?d:0)-(w(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":z,"===":function(a,c,d,e){return d(a,c)===e(a,c)},"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,
+c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Se={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Pb=function(a){this.options=a};Pb.prototype={constructor:Pb,lex:function(a){this.text=a;this.index=0;this.ch=s;this.lastCh=":";this.tokens=[];var c;
+for(a=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&("{"===a[0]&&(c=this.tokens[this.tokens.length-1]))&&(c.json=-1===c.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&
+a.unshift(this.ch),this.is("}]")&&a.shift(),this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{var d=this.ch+this.peek(),e=d+this.peek(2),f=Ma[this.ch],h=Ma[d],g=Ma[e];g?(this.tokens.push({index:this.index,text:e,fn:g}),this.index+=3):h?(this.tokens.push({index:this.index,text:d,fn:h}),this.index+=2):f?(this.tokens.push({index:this.index,text:this.ch,fn:f,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+
+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},
+throwError:function(a,c,d){d=d||this.index;c=w(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw Aa("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=P(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-
+1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,text:a,json:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,f,h,g;this.index<this.text.length;){g=this.text.charAt(this.index);if("."===g||this.isIdent(g)||this.isNumber(g))"."===g&&(e=this.index),c+=g;else break;this.index++}if(e)for(f=this.index;f<this.text.length;){g=this.text.charAt(f);if("("===g){h=c.substr(e-d+1);c=c.substr(0,e-d);this.index=f;break}if(this.isWhitespace(g))f++;
+else break}d={index:d,text:c};if(Ma.hasOwnProperty(c))d.fn=Ma[c],d.json=Ma[c];else{var m=Gc(c,this.options,this.text);d.fn=t(function(a,c){return m(a,c)},{assign:function(d,e){return rb(d,c,e,a.text,a.options)}})}this.tokens.push(d);h&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+1,text:h,json:!1}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,f=!1;this.index<this.text.length;){var h=this.text.charAt(this.index),e=e+h;if(f)"u"===h?(h=this.text.substring(this.index+
+1,this.index+5),h.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+h+"]"),this.index+=4,d+=String.fromCharCode(parseInt(h,16))):d=(f=Se[h])?d+f:d+h,f=!1;else if("\\"===h)f=!0;else{if(h===a){this.index++;this.tokens.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}d+=h}this.index++}this.throwError("Unterminated quote",c)}};var $a=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};$a.ZERO=function(){return 0};$a.prototype={constructor:$a,parse:function(a,
+c){this.text=a;this.json=c;this.tokens=this.lexer.lex(a);c&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:a,index:0})});var d=c?this.primary():this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);d.literal=!!d.literal;d.constant=!!d.constant;return d},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=
+this.arrayDeclaration();else if(this.expect("{"))a=this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);c.json&&(a.constant=!0,a.literal=!0)}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw Aa("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===
+this.tokens.length)throw Aa("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var f=this.tokens[0],h=f.text;if(h===a||h===c||h===d||h===e||!(a||c||d||e))return f}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.json&&!a.json&&this.throwError("is not valid json",a),this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return t(function(d,e){return a(d,
+e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return t(function(e,f){return a(e,f)?c(e,f):d(e,f)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return t(function(e,f){return c(e,f,a,d)},{constant:a.constant&&d.constant})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,f=0;f<a.length;f++){var h=a[f];h&&(e=h(c,d))}return e}},filterChain:function(){for(var a=
+this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e=function(a,e,g){g=[g];for(var m=0;m<d.length;m++)g.push(d[m](a,e));return c.apply(a,g)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+
+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),function(d,f){return a.assign(d,c(d,f),f)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary();if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=
+this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a},relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=
+this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn($a.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=Gc(d,this.options,this.text);return t(function(c,d,g){return e(g||a(c,d))},{assign:function(e,h,g){return rb(a(e,g),d,h,c.text,c.options)}})},objectIndex:function(a){var c=
+this,d=this.expression();this.consume("]");return t(function(e,f){var h=a(e,f),g=d(e,f),m;if(!h)return s;(h=Za(h[g],c.text))&&(h.then&&c.options.unwrapPromises)&&(m=h,"$$v"in h||(m.$$v=s,m.then(function(a){m.$$v=a})),h=h.$$v);return h},{assign:function(e,f,h){var g=d(e,h);return Za(a(e,h),c.text)[g]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(f,h){for(var g=[],m=c?c(f,h):
+f,k=0;k<d.length;k++)g.push(d[k](f,h));k=a(f,h,m)||z;Za(m,e.text);Za(k,e.text);g=k.apply?k.apply(m,g):k(g[0],g[1],g[2],g[3],g[4]);return Za(g,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{if(this.peek("]"))break;var d=this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return t(function(c,d){for(var h=[],g=0;g<a.length;g++)h.push(a[g](c,d));return h},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;
+var d=this.expect(),d=d.string||d.text;this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return t(function(c,d){for(var e={},m=0;m<a.length;m++){var k=a[m];e[k.key]=k.value(c,d)}return e},{literal:!0,constant:c})}};var Ob={},ta=A("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},T=U.createElement("a"),Jc=ra(R.location.href,!0);jc.$inject=["$provide"];Kc.$inject=["$locale"];Mc.$inject=["$locale"];
+var Pc=".",Ne={yyyy:X("FullYear",4),yy:X("FullYear",2,0,!0),y:X("FullYear",1),MMMM:tb("Month"),MMM:tb("Month",!0),MM:X("Month",2,1),M:X("Month",1,1),dd:X("Date",2),d:X("Date",1),HH:X("Hours",2),H:X("Hours",1),hh:X("Hours",2,-12),h:X("Hours",1,-12),mm:X("Minutes",2),m:X("Minutes",1),ss:X("Seconds",2),s:X("Seconds",1),sss:X("Milliseconds",3),EEEE:tb("Day"),EEE:tb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(sb(Math[0<
+a?"floor":"ceil"](a/60),2)+sb(Math.abs(a%60),2))},ww:Rc(2),w:Rc(1)},Me=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Le=/^\-?\d+$/;Lc.$inject=["$locale"];var Je=Y(P),Ke=Y(Ea);Nc.$inject=["$parse"];var jd=Y({restrict:"E",compile:function(a,c){8>=V&&(c.href||c.name||c.$set("href",""),a.append(U.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var f="[object SVGAnimatedString]"===va.call(c.prop("href"))?"xlink:href":"href";c.on("click",
+function(a){c.attr(f)||a.preventDefault()})}}}),Db={};r(mb,function(a,c){if("multiple"!=a){var d=la("ng-"+c);Db[d]=function(){return{priority:100,link:function(a,f,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});r(["src","srcset","href"],function(a){var c=la("ng-"+a);Db[c]=function(){return{priority:99,link:function(d,e,f){var h=a,g=a;"href"===a&&"[object SVGAnimatedString]"===va.call(e.prop("href"))&&(g="xlinkHref",f.$attr[g]="xlink:href",h=null);f.$observe(c,function(a){a&&(f.$set(g,a),V&&h&&
+e.prop(h,f[g]))})}}}});var wb={$addControl:z,$removeControl:z,$setValidity:z,$setDirty:z,$setPristine:z};Sc.$inject=["$element","$attrs","$scope","$animate"];var Tc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Sc,compile:function(){return{pre:function(a,e,f,h){if(!f.action){var g=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};pb(e[0],"submit",g);e.on("$destroy",function(){c(function(){Ta(e[0],"submit",g)},0,!1)})}var m=e.parent().controller("form"),
+k=f.name||f.ngForm;k&&rb(a,k,h,k);if(m)e.on("$destroy",function(){m.$removeControl(h);k&&rb(a,k,s,k);t(h,wb)})}}}}}]},kd=Tc(),xd=Tc(!0),Te=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ue=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,Ve=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Uc=/^(\d{4})-(\d{2})-(\d{2})$/,Vc=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)$/,Sb=/^(\d{4})-W(\d\d)$/,Wc=/^(\d{4})-(\d\d)$/,Xc=/^(\d\d):(\d\d)$/,Yc={text:ab,date:bb("date",Uc,yb(Uc,
+["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":bb("datetimelocal",Vc,yb(Vc,["yyyy","MM","dd","HH","mm"]),"yyyy-MM-ddTHH:mm"),time:bb("time",Xc,yb(Xc,["HH","mm"]),"HH:mm"),week:bb("week",Sb,function(a){if(pa(a))return a;if(C(a)){Sb.lastIndex=0;var c=Sb.exec(a);if(c){a=+c[1];var d=+c[2],c=Qc(a),d=7*(d-1);return new Date(a,0,c.getDate()+d)}}return NaN},"yyyy-Www"),month:bb("month",Wc,yb(Wc,["yyyy","MM"]),"yyyy-MM"),number:function(a,c,d,e,f,h){ab(a,c,d,e,f,h);e.$parsers.push(function(a){var c=e.$isEmpty(a);
+if(c||Ve.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return s});Oe(e,"number",c);e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return oa(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);return oa(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return oa(e,
+"number",e.$isEmpty(a)||zb(a),a)})},url:function(a,c,d,e,f,h){ab(a,c,d,e,f,h);a=function(a){return oa(e,"url",e.$isEmpty(a)||Te.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,f,h){ab(a,c,d,e,f,h);a=function(a){return oa(e,"email",e.$isEmpty(a)||Ue.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){E(d.name)&&c.attr("name",db());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=
+d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var f=d.ngTrueValue,h=d.ngFalseValue;C(f)||(f=!0);C(h)||(h=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==f};e.$formatters.push(function(a){return a===f});e.$parsers.push(function(a){return a?f:h})},hidden:z,button:z,submit:z,reset:z,file:z},gc=["$browser","$sniffer","$filter",function(a,c,d){return{restrict:"E",
+require:"?ngModel",link:function(e,f,h,g){g&&(Yc[P(h.type)]||Yc.text)(e,f,h,g,c,a,d)}}}],vb="ng-valid",ub="ng-invalid",La="ng-pristine",xb="ng-dirty",We=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function(a,c,d,e,f,h){function g(a,c){c=c?"-"+hb(c,"-"):"";h.removeClass(e,(a?ub:vb)+c);h.addClass(e,(a?vb:ub)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=
+!1;this.$name=d.name;var m=f(d.ngModel),k=m.assign;if(!k)throw A("ngModel")("nonassign",d.ngModel,ga(e));this.$render=z;this.$isEmpty=function(a){return E(a)||""===a||null===a||a!==a};var l=e.inheritedData("$formController")||wb,n=0,q=this.$error={};e.addClass(La);g(!0);this.$setValidity=function(a,c){q[a]!==!c&&(c?(q[a]&&n--,n||(g(!0),this.$valid=!0,this.$invalid=!1)):(g(!1),this.$invalid=!0,this.$valid=!1,n++),q[a]=!c,g(c,a),l.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;
+this.$pristine=!0;h.removeClass(e,xb);h.addClass(e,La)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,h.removeClass(e,La),h.addClass(e,xb),l.$setDirty());r(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,k(a,d),r(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var p=this;a.$watch(function(){var c=m(a);if(p.$modelValue!==c){var d=p.$formatters,e=d.length;for(p.$modelValue=c;e--;)c=d[e](c);p.$viewValue!==
+c&&(p.$viewValue=c,p.$render())}return c})}],Md=function(){return{require:["ngModel","^?form"],controller:We,link:function(a,c,d,e){var f=e[0],h=e[1]||wb;h.$addControl(f);a.$on("$destroy",function(){h.$removeControl(f)})}}},Od=Y({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),hc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var f=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",
+!0),a};e.$formatters.push(f);e.$parsers.unshift(f);d.$observe("required",function(){f(e.$viewValue)})}}}},Nd=function(){return{require:"ngModel",link:function(a,c,d,e){var f=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!E(a)){var c=[];a&&r(a.split(f),function(a){a&&c.push(aa(a))});return c}});e.$formatters.push(function(a){return M(a)?a.join(", "):s});e.$isEmpty=function(a){return!a||!a.length}}}},Xe=/^(true|false|\d+)$/,Pd=function(){return{priority:100,
+compile:function(a,c){return Xe.test(c.ngValue)?function(a,c,f){f.$set("value",a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},pd=ua(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==s?"":a)})}),rd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],qd=["$sce","$parse",
+function(a,c){return function(d,e,f){e.addClass("ng-binding").data("$binding",f.ngBindHtml);var h=c(f.ngBindHtml);d.$watch(function(){return(h(d)||"").toString()},function(c){e.html(a.getTrustedHtml(h(d))||"")})}}],sd=Rb("",!0),ud=Rb("Odd",0),td=Rb("Even",1),vd=ua({compile:function(a,c){c.$set("ngCloak",s);a.removeClass("ng-cloak")}}),wd=[function(){return{scope:!0,controller:"@",priority:500}}],ic={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
+function(a){var c=la("ng-"+a);ic[c]=["$parse",function(d){return{compile:function(e,f){var h=d(f[c]);return function(c,d,e){d.on(P(a),function(a){c.$apply(function(){h(c,{$event:a})})})}}}}]});var zd=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,h){var g,m,k;c.$watch(e.ngIf,function(f){Oa(f)?m||(m=c.$new(),h(m,function(c){c[c.length++]=U.createComment(" end ngIf: "+e.ngIf+" ");g={clone:c};a.enter(c,d.parent(),d)})):(k&&(k.remove(),
+k=null),m&&(m.$destroy(),m=null),g&&(k=Cb(g.clone),a.leave(k,function(){k=null}),g=null))})}}}],Ad=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,f){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Pa.noop,compile:function(h,g){var m=g.ngInclude||g.src,k=g.onload||"",l=g.autoscroll;return function(g,h,p,r,s){var t=0,y,v,J,x=function(){v&&(v.remove(),v=null);y&&(y.$destroy(),y=null);J&&(e.leave(J,function(){v=null}),v=J,J=null)};g.$watch(f.parseAsResourceUrl(m),
+function(f){var m=function(){!w(l)||l&&!g.$eval(l)||d()},p=++t;f?(a.get(f,{cache:c}).success(function(a){if(p===t){var c=g.$new();r.template=a;a=s(c,function(a){x();e.enter(a,null,h,m)});y=c;J=a;y.$emit("$includeContentLoaded");g.$eval(k)}}).error(function(){p===t&&x()}),g.$emit("$includeContentRequested")):(x(),r.template=null)})}}}}],Qd=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){d.html(f.template);a(d.contents())(c)}}}],Bd=ua({priority:450,
+compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Cd=ua({terminal:!0,priority:1E3}),Dd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,f,h){var g=h.count,m=h.$attr.when&&f.attr(h.$attr.when),k=h.offset||0,l=e.$eval(m)||{},n={},q=c.startSymbol(),p=c.endSymbol(),s=/^when(Minus)?(.+)$/;r(h,function(a,c){s.test(c)&&(l[P(c.replace("when","").replace("Minus","-"))]=f.attr(h.$attr[c]))});r(l,function(a,e){n[e]=c(a.replace(d,q+g+"-"+k+p))});e.$watch(function(){var c=
+parseFloat(e.$eval(g));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-k));return n[c](e,f,!0)},function(a){f.text(a)})}}}],Ed=["$parse","$animate",function(a,c){var d=A("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,f,h,g,m){var k=h.ngRepeat,l=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),n,q,p,s,t,w,y={$id:Ha};if(!l)throw d("iexp",k);h=l[1];g=l[2];(l=l[3])?(n=a(l),q=function(a,c,d){w&&(y[w]=a);y[t]=c;y.$index=d;return n(e,
+y)}):(p=function(a,c){return Ha(c)},s=function(a){return a});l=h.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp",h);t=l[3]||l[1];w=l[2];var H={};e.$watchCollection(g,function(a){var g,h,l=f[0],n,y={},C,B,K,z,E,L,A=[];if(cb(a))E=a,n=q||p;else{n=q||s;E=[];for(K in a)a.hasOwnProperty(K)&&"$"!=K.charAt(0)&&E.push(K);E.sort()}C=E.length;h=A.length=E.length;for(g=0;g<h;g++)if(K=a===E?g:E[g],z=a[K],z=n(K,z,g),za(z,"`track by` id"),H.hasOwnProperty(z))L=H[z],delete H[z],y[z]=
+L,A[g]=L;else{if(y.hasOwnProperty(z))throw r(A,function(a){a&&a.scope&&(H[a.id]=a)}),d("dupes",k,z);A[g]={id:z};y[z]=!1}for(K in H)H.hasOwnProperty(K)&&(L=H[K],g=Cb(L.clone),c.leave(g),r(g,function(a){a.$$NG_REMOVED=!0}),L.scope.$destroy());g=0;for(h=E.length;g<h;g++){K=a===E?g:E[g];z=a[K];L=A[g];A[g-1]&&(l=A[g-1].clone[A[g-1].clone.length-1]);if(L.scope){B=L.scope;n=l;do n=n.nextSibling;while(n&&n.$$NG_REMOVED);L.clone[0]!=n&&c.move(Cb(L.clone),null,v(l));l=L.clone[L.clone.length-1]}else B=e.$new();
+B[t]=z;w&&(B[w]=K);B.$index=g;B.$first=0===g;B.$last=g===C-1;B.$middle=!(B.$first||B.$last);B.$odd=!(B.$even=0===(g&1));L.scope||m(B,function(a){a[a.length++]=U.createComment(" end ngRepeat: "+k+" ");c.enter(a,null,v(l));l=a;L.scope=B;L.clone=a;y[L.id]=L})}H=y})}}}],Fd=["$animate",function(a){return function(c,d,e){c.$watch(e.ngShow,function(c){a[Oa(c)?"removeClass":"addClass"](d,"ng-hide")})}}],yd=["$animate",function(a){return function(c,d,e){c.$watch(e.ngHide,function(c){a[Oa(c)?"addClass":"removeClass"](d,
+"ng-hide")})}}],Gd=ua(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Hd=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,f){var h,g,m,k=[];c.$watch(e.ngSwitch||e.on,function(d){var n,q=k.length;if(0<q){if(m){for(n=0;n<q;n++)m[n].remove();m=null}m=[];for(n=0;n<q;n++){var p=g[n];k[n].$destroy();m[n]=p;a.leave(p,function(){m.splice(n,1);0===m.length&&(m=null)})}}g=
+[];k=[];if(h=f.cases["!"+d]||f.cases["?"])c.$eval(e.change),r(h,function(d){var e=c.$new();k.push(e);d.transclude(e,function(c){var e=d.element;g.push(c);a.enter(c,e.parent(),e)})})})}}}],Id=ua({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,f){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:f,element:c})}}),Jd=ua({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,f){e.cases["?"]=e.cases["?"]||
+[];e.cases["?"].push({transclude:f,element:c})}}),Ld=ua({link:function(a,c,d,e,f){if(!f)throw A("ngTransclude")("orphan",ga(c));f(function(a){c.empty();c.append(a)})}}),ld=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],Ye=A("ngOptions"),Kd=Y({terminal:!0}),md=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
+e={$setViewValue:z};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var m=this,k={},l=e,n;m.databound=d.ngModel;m.init=function(a,c,d){l=a;n=d};m.addOption=function(c){za(c,'"option value"');k[c]=!0;l.$viewValue==c&&(a.val(c),n.parent()&&n.remove())};m.removeOption=function(a){this.hasOption(a)&&(delete k[a],l.$viewValue==a&&this.renderUnknownOption(a))};m.renderUnknownOption=function(c){c="? "+Ha(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",
+!0)};m.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){m.renderUnknownOption=z})}],link:function(e,h,g,m){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(A.parent()&&A.remove(),c.val(a),""===a&&C.prop("selected",!0)):E(a)&&C?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){A.parent()&&A.remove();d.$setViewValue(c.val())})})}function l(a,c,d){var e;d.$render=function(){var a=new Va(d.$viewValue);r(c.find("option"),
+function(c){c.selected=w(a.get(c.value))})};a.$watch(function(){wa(e,d.$viewValue)||(e=$(d.$viewValue),d.$render())});c.on("change",function(){a.$apply(function(){var a=[];r(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function h(){var a={"":[]},c=[""],d,k,s,t,u;t=g.$modelValue;u=x(e)||[];var C=n?Tb(u):u,E,B,D;B={};s=!1;var F,J;if(p)if(v&&M(t))for(s=new Va([]),D=0;D<t.length;D++)B[m]=t[D],s.put(v(e,B),t[D]);else s=new Va(t);for(D=0;E=C.length,
+D<E;D++){k=D;if(n){k=C[D];if("$"===k.charAt(0))continue;B[n]=k}B[m]=u[k];d=q(e,B)||"";(k=a[d])||(k=a[d]=[],c.push(d));p?d=w(s.remove(v?v(e,B):r(e,B))):(v?(d={},d[m]=t,d=v(e,d)===v(e,B)):d=t===r(e,B),s=s||d);F=l(e,B);F=w(F)?F:"";k.push({id:v?v(e,B):n?C[D]:D,label:F,selected:d})}p||(z||null===t?a[""].unshift({id:"",label:"",selected:!s}):s||a[""].unshift({id:"?",label:"",selected:!0}));B=0;for(C=c.length;B<C;B++){d=c[B];k=a[d];A.length<=B?(t={element:H.clone().attr("label",d),label:k.label},u=[t],A.push(u),
+f.append(t.element)):(u=A[B],t=u[0],t.label!=d&&t.element.attr("label",t.label=d));F=null;D=0;for(E=k.length;D<E;D++)s=k[D],(d=u[D+1])?(F=d.element,d.label!==s.label&&F.text(d.label=s.label),d.id!==s.id&&F.val(d.id=s.id),d.selected!==s.selected&&F.prop("selected",d.selected=s.selected)):(""===s.id&&z?J=z:(J=y.clone()).val(s.id).attr("selected",s.selected).text(s.label),u.push({element:J,label:s.label,id:s.id,selected:s.selected}),F?F.after(J):t.element.append(J),F=J);for(D++;u.length>D;)u.pop().element.remove()}for(;A.length>
+B;)A.pop()[0].element.remove()}var k;if(!(k=t.match(d)))throw Ye("iexp",t,ga(f));var l=c(k[2]||k[1]),m=k[4]||k[6],n=k[5],q=c(k[3]||""),r=c(k[2]?k[1]:m),x=c(k[7]),v=k[8]?c(k[8]):null,A=[[{element:f,label:""}]];z&&(a(z)(e),z.removeClass("ng-scope"),z.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=x(e)||[],d={},h,k,l,q,t,w,u;if(p)for(k=[],q=0,w=A.length;q<w;q++)for(a=A[q],l=1,t=a.length;l<t;l++){if((h=a[l].element)[0].selected){h=h.val();n&&(d[n]=h);if(v)for(u=0;u<c.length&&
+(d[m]=c[u],v(e,d)!=h);u++);else d[m]=c[h];k.push(r(e,d))}}else{h=f.val();if("?"==h)k=s;else if(""===h)k=null;else if(v)for(u=0;u<c.length;u++){if(d[m]=c[u],v(e,d)==h){k=r(e,d);break}}else d[m]=c[h],n&&(d[n]=h),k=r(e,d);1<A[0].length&&A[0][1].id!==h&&(A[0][1].selected=!1)}g.$setViewValue(k)})});g.$render=h;e.$watch(h)}if(m[1]){var q=m[0];m=m[1];var p=g.multiple,t=g.ngOptions,z=!1,C,y=v(U.createElement("option")),H=v(U.createElement("optgroup")),A=y.clone();g=0;for(var x=h.children(),F=x.length;g<F;g++)if(""===
+x[g].value){C=z=x.eq(g);break}q.init(m,z,A);p&&(m.$isEmpty=function(a){return!a||0===a.length});t?n(e,h,m):p?l(e,h,m):k(e,h,m,q)}}}}],od=["$interpolate",function(a){var c={addOption:z,removeOption:z};return{restrict:"E",priority:100,compile:function(d,e){if(E(e.value)){var f=a(d.text(),!0);f||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),l=k.data("$selectController")||k.parent().data("$selectController");l&&l.databound?d.prop("selected",!1):l=c;f?a.$watch(f,function(a,c){e.$set("value",
+a);a!==c&&l.removeOption(c);l.addOption(a)}):l.addOption(e.value);d.on("$destroy",function(){l.removeOption(e.value)})}}}}],nd=Y({restrict:"E",terminal:!1});R.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):((Fa=R.jQuery)?(v=Fa,t(Fa.fn,{scope:Ia.scope,isolateScope:Ia.isolateScope,controller:Ia.controller,injector:Ia.injector,inheritedData:Ia.inheritedData}),Eb("remove",!0,!0,!1),Eb("empty",!1,!1,!1),Eb("html",!1,!1,!0)):v=O,Pa.element=v,fd(Pa),v(U).ready(function(){cd(U,
+cc)}))})(window,document);!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}</style>');
+//# sourceMappingURL=angular.min.js.map
diff --git a/plugins/scheduler2/static/js/scheduler-SchedulerCtrl.js b/plugins/scheduler2/static/js/scheduler-SchedulerCtrl.js
new file mode 100755 (executable)
index 0000000..30bf523
--- /dev/null
@@ -0,0 +1,111 @@
+var myApp = angular.module('myApp', []);\r
+myApp.config(function ($interpolateProvider) {\r
+    $interpolateProvider.startSymbol('{[{').endSymbol('}]}');\r
+});\r
+myApp.factory('$exceptionHandler', function () {\r
+    return function (exception, cause) {\r
+        if (exception.message.contains('leases')) {\r
+            console.log(exception.message);\r
+            \r
+            var tmpScope = angular.element(document.getElementById('SchedulerCtrl')).scope();\r
+            tmpScope.initSlots(_schedulerCurrentCellPosition, _schedulerCurrentCellPosition + SchedulerTotalVisibleCells);\r
+        }\r
+            \r
+    };\r
+});\r
+\r
+// Create a private execution space for our controller. When\r
+// executing this function expression, we're going to pass in\r
+// the Angular reference and our application module.\r
+(function (ng, app) {\r
+\r
+\r
+    // Define our Controller constructor.\r
+    function Controller($scope) {\r
+\r
+        // Store the scope so we can reference it in our\r
+        // class methods\r
+        this.scope = $scope;\r
+\r
+        // Set up the default scope value.\r
+        this.scope.errorMessage = null;\r
+        this.scope.name = "";\r
+\r
+        $scope.resources = SchedulerDataViewData;\r
+        $scope.slots = SchedulerSlotsViewData;\r
+        //$scope.msg = "hello";\r
+\r
+        angular.element(document).ready(function() {\r
+            //console.log('Hello World');\r
+            //alert('Hello World');\r
+            //afterAngularRendered();\r
+        });\r
+\r
+        $scope.moveFrontSlot = function(from, to) {\r
+            //$scope.slots.shift();\r
+            //$scope.slots.push(SchedulerSlots[to]);\r
+            //for (var j = 0; j < $scope.resources.length; j++) {\r
+            //    $scope.resources[j].leases.shift();\r
+            //    $scope.resources[j].leases.push(SchedulerData[j].leases[to]);\r
+            //}\r
+            //try {\r
+            //    $scope.$digest();\r
+            //    //$scope.$apply();\r
+            //} catch (err) {\r
+            //    $scope.initSlots(from, to);\r
+            //}\r
+            $scope.initSlots(from, to);\r
+        };\r
+\r
+        $scope.moveBackSlot = function(from, to) {\r
+            $scope.$apply(function() {\r
+                //try {\r
+                //    $scope.slots.pop();\r
+                //    $scope.slots.unshift(SchedulerSlots[from]);\r
+                //    for (var j = 0; j < $scope.resources.length; j++) {\r
+                //        $scope.resources[j].leases.pop();\r
+                //        $scope.resources[j].leases.unshift(SchedulerData[j].leases[from]);\r
+                //    }\r
+                //} catch (err) {\r
+                //    alert("error");\r
+                //}\r
+\r
+                $scope.initSlots(from, to);\r
+            });\r
+        };\r
+\r
+        $scope.SetSchedulerResources = function (start, to, filter) {\r
+            for (var k = start; k < to; k++) {\r
+                if ($scope.resources.length < SchedulerData.length)\r
+                    $scope.resources.push(jQuery.extend(true, {}, SchedulerData[k]));\r
+                $scope.resources[k].leases = [];\r
+            }\r
+            $scope.initSlots(0, SchedulerTotalVisibleCells);\r
+        };\r
+\r
+        $scope.initSlots = function(from, to) {\r
+            //init\r
+            $scope.slots = [];\r
+            //set\r
+            for (var i = from; i < to; i++) {\r
+                $scope.slots.push(SchedulerSlots[i]);\r
+                for (var j = 0; j < $scope.resources.length; j++) {\r
+                    $scope.resources[j].leases.push(SchedulerData[j].leases[i]);\r
+                }\r
+            }\r
+            //apply\r
+            $scope.$apply();\r
+        };\r
+\r
+\r
+        // Return this object reference.\r
+        return (this);\r
+\r
+    }\r
+\r
+\r
+    // Define the Controller as the constructor function.\r
+    app.controller("SchedulerCtrl", Controller);\r
+\r
+\r
+})(angular, myApp);
\ No newline at end of file
diff --git a/plugins/scheduler2/static/js/scheduler-helpers.js b/plugins/scheduler2/static/js/scheduler-helpers.js
new file mode 100755 (executable)
index 0000000..df9ac9f
--- /dev/null
@@ -0,0 +1,123 @@
+function lookup(array, prop, value) {\r
+    for (var i = 0, len = array.length; i < len; i++)\r
+        if (array[i][prop] === value) return array[i];\r
+}\r
+\r
+function GetTimeFromInt(intTime) {\r
+    var has30 = intTime % 1;\r
+    var CurInt = parseInt(intTime / 1);\r
+    if (CurInt < 10)\r
+        CurInt = "0" + CurInt;\r
+\r
+    if (has30 == 0) {\r
+        return CurInt + ":00";\r
+    } else {\r
+        return CurInt + ":30";\r
+    }\r
+}\r
+\r
+function fixOddEvenClasses() {\r
+    $('#' + rsvrTblNm + ' tbody tr').removeClass();\r
+    $('#' + rsvrTblNm + ' tbody tr:visible:even').addClass('even');\r
+    $('#' + rsvrTblNm + ' tbody tr:visible:odd').addClass('odd');\r
+}\r
+\r
+SlotStatus = {\r
+    free: 0,\r
+    selected: 1,\r
+    reserved: 2,\r
+    maintenance: 3,\r
+}\r
+\r
+function schedulerIsRightClick(e) {\r
+    if (e.which) {\r
+        return (e.which == 3);\r
+    } else if (e.button) {\r
+        return (e.button == 2);\r
+    }\r
+    return false;\r
+}\r
+\r
+function schedulerCloneArray(originalArray) {\r
+    var clonedArray = $.map(originalArray, function (obj) {\r
+        return $.extend(true, {}, obj);\r
+    });\r
+\r
+    return clonedArray;\r
+}\r
+\r
+function schedulerGetSlots(slotSpan) {\r
+    if (slotSpan == 0) slotSpan = 10;\r
+    var slots = [];\r
+    var d = new Date(2014, 1, 1, 0, 0, 0, 0);\r
+    var i = 0;\r
+    while (d.getDate() == 1) {\r
+        var tmpTime = schedulerPadStr(d.getHours()) + ':' + schedulerPadStr(d.getMinutes());\r
+        slots.push({ id: i, time: tmpTime });\r
+        d = schedulerAddMinutes(d, slotSpan);\r
+        i++;\r
+    }\r
+    return slots;\r
+}\r
+\r
+function schedulerGetLeases(slotSpan) {\r
+    if (slotSpan == 0) slotSpan = 10;\r
+    var slots = [];\r
+    var d = new Date(2014, 1, 1, 0, 0, 0, 0);\r
+    var i = 0;\r
+    while (d.getDate() == 1) {\r
+        //slots.push({ id: i, status: getRandomStatus() });\r
+        slots.push({ id: i, status: "free" });\r
+        d = schedulerAddMinutes(d, slotSpan);\r
+        i++;\r
+    }\r
+    return slots;\r
+}\r
+\r
+//\r
+//GetSlotId from time\r
+function schedulerGetSlotId(startTime, duration, granularity) {\r
+    startTime = parseInt(startTime);\r
+    var d = new Date(startTime * 1000);\r
+    var timespan = 60 / schedulerSlotsPerHour;\r
+    var slotid = 0;\r
+    slotid += d.getHours() * schedulerSlotsPerHour;\r
+    slotid += d.getMinutes() / timespan;\r
+    return slotid;\r
+}\r
+\r
+function schedulerSelectSlot(slotId, resourceIndex) {\r
+    SchedulerDataViewData[resourceIndex].leases[slotId].status = 'selected';\r
+}\r
+function schedulerFreeSlot(slotId, resourceIndex) {\r
+    SchedulerDataViewData[resourceIndex].leases[slotId].status = 'free';\r
+}\r
+//\r
+//Find Resource By Id\r
+function schedulerFindResourceById(Resources, id) {\r
+    for (var i = 0, len = Resources.length; i < len; i++) {\r
+        if (Resources[i].id == id)\r
+            return Resources[i]; // Return as soon as the object is found\r
+    }\r
+    return null; // The object was not found\r
+}\r
+\r
+//\r
+//for testing\r
+function getRandomStatus() {\r
+    var randint = Math.floor(Math.random() * (10 - 0 + 1) + 0);\r
+    switch (randint) {\r
+        case 0: case 1: case 2: case 3: case 4: case 5: case 6: return "free";\r
+        //case 8: return "selected";\r
+        case 7: case 8: case 9: return "reserved";\r
+        case 10: return "maintenance";\r
+    }\r
+}\r
+\r
+function schedulerPadStr(i) {\r
+    return (i < 10) ? "0" + i : "" + i;\r
+}\r
+\r
+function schedulerAddMinutes(date, minutes) {\r
+    return new Date(date.getTime() + minutes * 60000);\r
+}
\ No newline at end of file
diff --git a/plugins/scheduler2/static/js/scheduler-table-selector.js b/plugins/scheduler2/static/js/scheduler-table-selector.js
new file mode 100755 (executable)
index 0000000..3a9a070
--- /dev/null
@@ -0,0 +1,178 @@
+////version 3\r
+var scheduler_table_dragStart_td = 0;\r
+var scheduler_table_dragStart_tr = 0;\r
+var scheduler_table_dragEnd_td = 0;\r
+var scheduler_table_dragEnd_tr = 0;\r
+//tmp gia ta loops & check gia to last state\r
+var tmp_scheduler_table_dragStart_td;\r
+var tmp_scheduler_table_dragStart_tr;\r
+var tmp_scheduler_table_dragEnd_td;\r
+var tmp_scheduler_table_dragEnd_tr;\r
+var schedulerTableIsDragging = false;\r
+// try stop \r
+var continueExecuting = false;\r
+var isExecuting = false;\r
+\r
+\r
+\r
+function rangeMouseDown(e) {\r
+    if (SchedulerData) console.time("mouse:rangeMouseDown");\r
+    if (schedulerIsRightClick(e)) {\r
+        return false;\r
+    } else {\r
+        scheduler_table_dragStart_tr = $(this).parent().index();\r
+        scheduler_table_dragStart_td = $(this).index() -1;\r
+        scheduler_table_dragEnd_tr = scheduler_table_dragStart_tr;\r
+        scheduler_table_dragEnd_td = scheduler_table_dragStart_td;\r
+        //alert(scheduler_table_dragStart_tr);\r
+        //var allCells = $("#tblReservation td");\r
+        //dragStart = allCells.index($(this));\r
+\r
+        if ( $(this).hasClass("free"))\r
+            $(this).addClass("selected_tmp");\r
+\r
+        schedulerTableIsDragging = true;\r
+        //selectRange();\r
+\r
+        if (typeof e.preventDefault != 'undefined') { e.preventDefault(); }\r
+        document.documentElement.onselectstart = function () { return false; };\r
+    }\r
+    if (SchedulerData) console.timeEnd("mouse:rangeMouseDown");\r
+}\r
+\r
+function rangeMouseUp(e) {\r
+    if (SchedulerData) console.time("mouse:rangeMouseUp");\r
+    if (schedulerIsRightClick(e)) {\r
+        return false;\r
+    } else {\r
+        //var allCells = $("#tblReservation td");\r
+        //dragEnd = allCells.index($(this));\r
+\r
+        scheduler_table_dragEnd_tr = $(this).parent().index();\r
+        scheduler_table_dragEnd_td = $(this).index() -1;\r
+\r
+        schedulerTableIsDragging = false;\r
+        selectRange(false);\r
+\r
+        document.documentElement.onselectstart = function () { return true; };\r
+    }\r
+    if (SchedulerData) console.timeEnd("mouse:rangeMouseUp");\r
+}\r
+\r
+function rangeMouseMove(e) {\r
+    //if (SchedulerData) console.time("mouse:rangeMouseMove");\r
+    if (schedulerTableIsDragging) {\r
+        scheduler_table_dragEnd_tr = $(this).parent().attr('data-trindex');\r
+        scheduler_table_dragEnd_td = $(this).attr('data-tdindex');\r
+\r
+        //if (SchedulerData) this.SchedulerData('foo');\r
+\r
+        if ((scheduler_table_dragEnd_tr != tmp_scheduler_table_dragEnd_tr) || (scheduler_table_dragEnd_td != tmp_scheduler_table_dragEnd_td)) {\r
+            //console.log(scheduler_table_dragEnd_tr + " - " + tmp_scheduler_table_dragEnd_tr);\r
+            //console.log(scheduler_table_dragEnd_td + " - " + tmp_scheduler_table_dragEnd_td);\r
+            //selectRange(true);\r
+        }\r
+    }\r
+    //if (SchedulerData) console.timeEnd("mouse:rangeMouseMove");\r
+}\r
+\r
+function selectRange(isTemp) {\r
+    if (SchedulerData) console.time("mouse:---selectRange");\r
+\r
+    if (!schedulerCtrlPressed)\r
+        $("#" + schedulerTblId + "  td.selected, #" + schedulerTblId + "  td.selected_tmp").each(function() {\r
+            $(this).removeClass('selected selected_tmp').addClass('free');\r
+            schedulerFreeSlot($(this).data('slotid'), $(this).siblings('th').data('resourceindex'));\r
+        });\r
+\r
+    tmp_scheduler_table_dragStart_td = scheduler_table_dragStart_td;\r
+    tmp_scheduler_table_dragStart_tr = scheduler_table_dragStart_tr;\r
+    tmp_scheduler_table_dragEnd_td = scheduler_table_dragEnd_td;\r
+    tmp_scheduler_table_dragEnd_tr = scheduler_table_dragEnd_tr;\r
+\r
+    if (tmp_scheduler_table_dragStart_td > tmp_scheduler_table_dragEnd_td) {\r
+        var tmp = tmp_scheduler_table_dragStart_td;\r
+        tmp_scheduler_table_dragStart_td = tmp_scheduler_table_dragEnd_td;\r
+        tmp_scheduler_table_dragEnd_td = tmp;\r
+    }\r
+\r
+    if (tmp_scheduler_table_dragStart_tr > tmp_scheduler_table_dragEnd_tr) {\r
+        var tmp = tmp_scheduler_table_dragStart_tr;\r
+        tmp_scheduler_table_dragStart_tr = tmp_scheduler_table_dragEnd_tr;\r
+        tmp_scheduler_table_dragEnd_tr = tmp;\r
+    }\r
+    //var angularScope = angular.element(document.getElementById('SchedulerCtrl')).scope();\r
+    //alert("tmp_scheduler_table_dragStart_td:" + tmp_scheduler_table_dragStart_td + "\n tmp_scheduler_table_dragStart_tr:" + tmp_scheduler_table_dragStart_tr + "\n tmp_scheduler_table_dragEnd_td:" + tmp_scheduler_table_dragEnd_td + "\n tmp_scheduler_table_dragEnd_tr:" + tmp_scheduler_table_dragEnd_tr);\r
+\r
+\r
+    for (var i = tmp_scheduler_table_dragStart_tr; i <= tmp_scheduler_table_dragEnd_tr; i++) {\r
+        for (var j = tmp_scheduler_table_dragStart_td; j <= tmp_scheduler_table_dragEnd_td; j++) {\r
+            //alert("i:" + i + "j:" + j);\r
+            var cell = $('#' + schedulerTblId + '  tbody tr:eq(' + i + ') td:eq(' + j + ')');\r
+            //$(cell)\r
+            var curClass = $(cell).attr("class");\r
+            curClass = curClass.replace('ng-scope','').trim();\r
+            //alert(curClass);\r
+            switch (curClass) {\r
+                case "free_tmp":\r
+                    $(cell).removeClass('selected_tmp selected free_tmp free');\r
+                    if (isTemp)\r
+                        $(cell).addClass("free_tmp");\r
+                    else{\r
+                        schedulerFreeSlot($(cell).data('slotid'), $(cell).siblings('th').data('resourceindex'));\r
+                        $(cell).addClass("free");\r
+                    }\r
+                    break;\r
+                case "free":\r
+                    $(cell).removeClass('selected_tmp selected free_tmp free');\r
+                    if (isTemp)\r
+                        $(cell).addClass("selected_tmp");\r
+                    else {\r
+                        schedulerSelectSlot($(cell).data('slotid'), $(cell).siblings('th').data('resourceindex'));\r
+                        $(cell).addClass("selected");\r
+                    }\r
+                    break;\r
+                case "selected_tmp":\r
+                    $(cell).removeClass('selected_tmp selected free_tmp free');\r
+                    if (isTemp)\r
+                        $(cell).addClass("selected_tmp");\r
+                    else {\r
+                        schedulerSelectSlot($(cell).data('slotid'), $(cell).siblings('th').data('resourceindex'));\r
+                        $(cell).addClass("selected");\r
+                    }\r
+                    break;\r
+                case "selected":\r
+                    $(cell).removeClass('selected_tmp selected free_tmp free');\r
+                    if (isTemp)\r
+                        $(cell).addClass("free_tmp");\r
+                    else {\r
+                        schedulerFreeSlot($(cell).data('slotid'), $(cell).siblings('th').data('resourceindex'));\r
+                        $(cell).addClass("free");\r
+                    }\r
+                    break;\r
+                case "closed":\r
+                    //do nothing\r
+                    //alert("not allowed!");\r
+                    break;\r
+            }\r
+        }\r
+    }\r
+\r
+\r
+    /*if (dragEnd + 1 < dragStart) { // reverse select\r
+    //alert(1);\r
+    $("#tblReservation td:not([class='info'])").slice(dragEnd, dragStart + 1).addClass('selected');\r
+    } else {\r
+    alert(dragStart + "-" + dragEnd);\r
+    $("#tblReservation td:not([class='info'])").slice(dragStart, dragEnd).addClass('selected');\r
+    }*/\r
+\r
+\r
+    if (SchedulerData) console.timeEnd("mouse:---selectRange");\r
+}\r
+\r
+function ClearTableSelection(){\r
+    $('#' + schedulerTblId + ' .selected').addClass("free").removeClass("selected");\r
+}\r
+\r
+\r
diff --git a/plugins/scheduler2/static/js/scheduler2.js b/plugins/scheduler2/static/js/scheduler2.js
new file mode 100755 (executable)
index 0000000..f57774e
--- /dev/null
@@ -0,0 +1,282 @@
+/*\r
+#\r
+# Copyright (c) 2013 NITLab, University of Thessaly, CERTH, Greece\r
+#\r
+# Permission is hereby granted, free of charge, to any person obtaining a copy\r
+# of this software and associated documentation files (the "Software"), to deal\r
+# in the Software without restriction, including without limitation the rights\r
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+# copies of the Software, and to permit persons to whom the Software is\r
+# furnished to do so, subject to the following conditions:\r
+#\r
+# The above copyright notice and this permission notice shall be included in\r
+# all copies or substantial portions of the Software.\r
+#\r
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\r
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+# THE SOFTWARE.\r
+#\r
+#\r
+# This is a MySlice plugin for the NITOS Scheduler\r
+# Nitos Scheduler v1\r
+#\r
+*/\r
+\r
+/* some params */\r
+//is ctrl keyboard button pressed\r
+var schedulerCtrlPressed = false;\r
+//table Id\r
+var schedulerTblId = "scheduler-reservation-table";\r
+var schedulerTblFirstColWidth = 150;\r
+//Some Data\r
+var schedulerSlotsPerHour = 6;\r
+var schedulerMaxRows = 25;\r
+var SchedulerData = [];\r
+var SchedulerSlots = [];\r
+var SchedulerDataViewData = [];\r
+var SchedulerSlotsViewData = [];\r
+var SchedulerTotalCells;\r
+var SchedulerTotalVisibleCells;\r
+//Help Variables\r
+var _schedulerCurrentCellPosition = 0;\r
+var _leasesDone = false;\r
+var _resourcesDone = false;\r
+//Enable Debug\r
+var schedulerDebug = false;\r
+//tmp to delete\r
+var tmpSchedulerLeases = [];\r
+\r
+(function ($) {\r
+    var scheduler2 = Plugin.extend({\r
+\r
+        /** XXX to check\r
+         * @brief Plugin constructor\r
+         * @param options : an associative array of setting values\r
+         * @param element : \r
+         * @return : a jQuery collection of objects on which the plugin is\r
+         *     applied, which allows to maintain chainability of calls\r
+         */\r
+        init: function (options, element) {\r
+            this.classname="scheduler2";\r
+            // Call the parent constructor, see FAQ when forgotten\r
+            this._super(options, element);\r
+\r
+            SchedulerSlots = schedulerGetSlots(60/schedulerSlotsPerHour);\r
+            //selection from table \r
+            $(window).keydown(function (evt) {\r
+                if (evt.which == 17) { // ctrl\r
+                    schedulerCtrlPressed = true;\r
+                }\r
+            }).keyup(function (evt) {\r
+                if (evt.which == 17) { // ctrl\r
+                    schedulerCtrlPressed = false;\r
+                }\r
+            });\r
+            $("#" + schedulerTblId).on('mousedown', 'td', rangeMouseDown).on('mouseup', 'td', rangeMouseUp).on('mousemove', 'td', rangeMouseMove);\r
+\r
+            // Explain this will allow query events to be handled\r
+            // What happens when we don't define some events ?\r
+            // Some can be less efficient\r
+\r
+            if (schedulerDebug) console.time("Listening_to_queries");\r
+            /* Listening to queries */\r
+            this.listen_query(options.query_uuid, 'all_ev');\r
+            this.listen_query(options.query_all_resources_uuid, 'all_resources');\r
+            this.listen_query(options.query_lease_uuid, 'lease');\r
+            //this.listen_query(options.query_lease_uuid, 'lease');\r
+            if (schedulerDebug) console.timeEnd("Listening_to_queries");\r
+\r
+        },\r
+\r
+        /* Handlers */\r
+\r
+        /* all_ev QUERY HANDLERS Start */\r
+        on_all_ev_clear_records: function (data) {\r
+            //alert('all_ev clear_records');\r
+        },\r
+        on_all_ev_query_in_progress: function (data) {\r
+           // alert('all_ev query_in_progress');\r
+        },\r
+        on_all_ev_new_record: function (data) {\r
+            //alert('all_ev new_record');\r
+        },\r
+        on_all_ev_query_done: function (data) {\r
+            //alert('all_ev query_done');\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_all_ev_field_state_changed: function (data) {\r
+            //alert('all_ev query_done');\r
+        },\r
+        /* all_ev QUERY HANDLERS End */\r
+        /* all_resources QUERY HANDLERS Start */\r
+        on_all_resources_clear_records: function (data) {\r
+            //data is empty on load\r
+        },\r
+        on_all_resources_query_in_progress: function (data) {\r
+            //data is empty on load\r
+        },\r
+        on_all_resources_new_record: function (data) {\r
+            //alert(data.toSource());\r
+            if (SchedulerData.length < schedulerMaxRows)\r
+                SchedulerData.push({ id: data.urn, index: SchedulerData.length, name: data.hrn, granularity: data.granularity, leases: schedulerGetLeases(60 / schedulerSlotsPerHour), type: data.type });\r
+            //alert(data.toSource());\r
+\r
+        },\r
+        on_all_resources_query_done: function (data) {\r
+            _resourcesDone = true;\r
+            this._initScheduler();\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_all_resources_field_state_changed: function (data) {\r
+            //alert('all_resources query_done');\r
+        },\r
+        /* all_resources QUERY HANDLERS End */\r
+        /* lease QUERY HANDLERS Start */\r
+        on_lease_clear_records: function (data) { console.log('clear_records'); },\r
+        on_lease_query_in_progress: function (data) { console.log('lease_query_in_progress'); },\r
+        on_lease_new_record: function (data) {\r
+            tmpSchedulerLeases.push({\r
+                id: schedulerGetSlotId(data.start_time, data.duration, data.granularity),\r
+                slice: data.slice,\r
+                status: 'reserved',\r
+                resource: data.resource,\r
+                network: data.network,\r
+                start_time: data.start_time,\r
+                lease_type: data.lease_type,\r
+                granularity: data.granularity,\r
+                duration: data.duration\r
+            });\r
+            //console.log(data.toSource()); console.log('lease_new_record');\r
+        },\r
+        on_lease_query_done: function (data) {\r
+            _leasesDone = true;\r
+            this._initScheduler();\r
+            // console.log('lease_query_done');\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_lease_field_state_changed: function (data) { console.log('lease_field_state_changed'); },\r
+        /* lease QUERY HANDLERS End */\r
+\r
+\r
+        // no prefix\r
+        on_filter_added: function (filter) {\r
+            var tmpScope = angular.element(document.getElementById('SchedulerCtrl')).scope();\r
+            tmpScope.SetSchedulerResources(0, schedulerMaxRows, filter);\r
+        },\r
+\r
+        // ... be sure to list all events here\r
+\r
+        /* RECORD HANDLERS */\r
+        on_all_new_record: function (record) {\r
+            //alert('on_all_new_record');\r
+        },\r
+\r
+        debug : function (logTxt) {\r
+            if (typeof window.console != 'undefined') {\r
+                console.debug(logTxt);\r
+            }\r
+        },\r
+\r
+        /* INTERNAL FUNCTIONS */\r
+        _initScheduler: function () {\r
+            if (_resourcesDone && _leasesDone)\r
+            {\r
+                /* GUI setup and event binding */\r
+                this._FixLeases();\r
+                this._initUI();\r
+            }\r
+        },\r
+\r
+        _initUI: function () {\r
+            //alert(1);\r
+            if (schedulerDebug) console.time("_initUI");\r
+            //init DatePicker Start\r
+            $("#DateToRes").datepicker({\r
+                dateFormat: "yy-mm-dd",\r
+                minDate: 0,\r
+                numberOfMonths: 3\r
+            }).change(function () {\r
+                //Scheduler2.loadWithDate();\r
+            }).click(function () {\r
+                $("#ui-datepicker-div").css("z-index", 5);\r
+            });\r
+            //End init DatePicker\r
+            \r
+            //init Table\r
+            this._FixTable();\r
+            //End init Table\r
+\r
+            //init Slider\r
+            $('#tblSlider').slider({\r
+                min: 0,\r
+                max: SchedulerTotalCells - SchedulerTotalVisibleCells - 1,\r
+                value: 0,\r
+                slide: function (event, ui) {\r
+                    //$("#amount").val("$" + ui.values[0] + " - $" + ui.values[1]);\r
+                    //console.log(ui.value);\r
+                    if (_schedulerCurrentCellPosition > ui.value)\r
+                        angular.element(document.getElementById('SchedulerCtrl')).scope().moveBackSlot(ui.value, ui.value + SchedulerTotalVisibleCells);\r
+                    else if (_schedulerCurrentCellPosition < ui.value)\r
+                        angular.element(document.getElementById('SchedulerCtrl')).scope().moveFrontSlot(ui.value, ui.value + SchedulerTotalVisibleCells);\r
+                    _schedulerCurrentCellPosition = ui.value;\r
+                }\r
+            });\r
+            //End init Slider\r
+\r
+            //other stuff\r
+            $("#plugin-scheduler-loader").hide();\r
+            $("#plugin-scheduler").show();\r
+            //fixOddEvenClasses();\r
+            //$("#" + schedulerTblId + " td:not([class])").addClass("free");\r
+            if (schedulerDebug) console.timeEnd("_initUI");\r
+        },\r
+\r
+        _FixLeases  : function () {\r
+            for (var i = 0; i < tmpSchedulerLeases.length; i++) {\r
+                var tmpLea = tmpSchedulerLeases[i];\r
+                var tmpRes = schedulerFindResourceById(SchedulerData, tmpLea.resource);\r
+                if (tmpRes != null) {\r
+                    //alert(tmpLea.id + '-' + tmpLea.start_time);\r
+                    tmpRes.leases[tmpLea.id] = tmpLea;\r
+                }\r
+            }\r
+        },\r
+\r
+        _FixTable: function () {\r
+            var colWidth = 50;\r
+            SchedulerTotalCells = SchedulerSlots.length;\r
+            $('#' + schedulerTblId + ' thead tr th:eq(0)').css("width", schedulerTblFirstColWidth);\r
+            //this get width might need fix depending on the template \r
+            var tblwidth = $('#scheduler-tab').parent().outerWidth();\r
+            SchedulerTotalVisibleCells = parseInt((tblwidth - schedulerTblFirstColWidth) / colWidth);\r
+\r
+            //if (SchedulerData.length == 0) {\r
+            //    //puth some test data\r
+            //    SchedulerData.push({ name: 'xyz+aaa', leases: schedulerGetLeases(60 / schedulerSlotsPerHour), urn: 'xyz+aaa', type: 'node' });\r
+            //    SchedulerData.push({ name: 'xyz+bbb', leases: schedulerGetLeases(60 / schedulerSlotsPerHour), urn: 'xyz+bbb', type: 'node' });\r
+            //    SchedulerData.push({ name: 'xyz+ccc', leases: schedulerGetLeases(60 / schedulerSlotsPerHour), urn: 'xyz+ccc', type: 'node' });\r
+            //    SchedulerData.push({ name: 'nitos1', leases: schedulerGetLeases(60 / schedulerSlotsPerHour), urn: 'nitos1', type: 'node' });\r
+            //}\r
+            var tmpScope = angular.element(document.getElementById('SchedulerCtrl')).scope();\r
+            tmpScope.SetSchedulerResources(0, schedulerMaxRows, null);\r
+        },\r
+        _SetPeriodInPage: function (start, end) {\r
+        }\r
+    });\r
+\r
+    //Sched2 = new Scheduler2();\r
+\r
+    /* Plugin registration */\r
+    $.plugin('Scheduler2', scheduler2);\r
+\r
+    // TODO Here use cases for instanciating plugins in different ways like in the pastie.\r
+\r
+\r
+})(jQuery);\r
+\r
+\r
+\r
diff --git a/plugins/scheduler2/static/js/scheduler2_old.js b/plugins/scheduler2/static/js/scheduler2_old.js
new file mode 100755 (executable)
index 0000000..ee833bf
--- /dev/null
@@ -0,0 +1,325 @@
+/*\r
+#\r
+# Copyright (c) 2013 NITLab, University of Thessaly, CERTH, Greece\r
+#\r
+# Permission is hereby granted, free of charge, to any person obtaining a copy\r
+# of this software and associated documentation files (the "Software"), to deal\r
+# in the Software without restriction, including without limitation the rights\r
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+# copies of the Software, and to permit persons to whom the Software is\r
+# furnished to do so, subject to the following conditions:\r
+#\r
+# The above copyright notice and this permission notice shall be included in\r
+# all copies or substantial portions of the Software.\r
+#\r
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\r
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+# THE SOFTWARE.\r
+#\r
+#\r
+# This is a MySlice plugin for the NITOS Scheduler\r
+# Nitos Scheduler v1\r
+#\r
+*/\r
+\r
+/* some params */\r
+var init_start_visible_index = 10;\r
+var init_end_visible_index = 21;\r
+var rsvrTblNm = "scheduler-reservation-table";\r
+var SchedulerResources = [];\r
+var schdlr_totalColums = 0;\r
+var SetPerFun = null;\r
+var Sched2 = null;\r
+var Debug = true;\r
+var schdlr_PartsInOneHour = 6;\r
+\r
+(function ($) {\r
+    var Scheduler2 = Plugin.extend({\r
+\r
+        /** XXX to check\r
+         * @brief Plugin constructor\r
+         * @param options : an associative array of setting values\r
+         * @param element : \r
+         * @return : a jQuery collection of objects on which the plugin is\r
+         *     applied, which allows to maintain chainability of calls\r
+         */\r
+        init: function (options, element) {\r
+            this.classname="scheduler2";\r
+            // Call the parent constructor, see FAQ when forgotten\r
+            this._super(options, element);\r
+\r
+            schdlr_totalColums = $("#scheduler-reservation-table th").length;\r
+\r
+            //selection from table \r
+            $(window).keydown(function (evt) {\r
+                if (evt.which == 17) { // ctrl\r
+                    ctrlPressed = true;\r
+                }\r
+            }).keyup(function (evt) {\r
+                if (evt.which == 17) { // ctrl\r
+                    ctrlPressed = false;\r
+                }\r
+            });\r
+            $("#" + rsvrTblNm).on('mousedown', 'td', rangeMouseDown).on('mouseup', 'td', rangeMouseUp).on('mousemove', 'td', rangeMouseMove);\r
+\r
+            // Explain this will allow query events to be handled\r
+            // What happens when we don't define some events ?\r
+            // Some can be less efficient\r
+\r
+            if (Debug) console.time("Listening_to_queries");\r
+            /* Listening to queries */\r
+            this.listen_query(options.query_uuid, 'all_ev');\r
+            this.listen_query(options.query_all_resources_uuid, 'all_resources');\r
+            this.listen_query(options.query_lease_uuid, 'lease');\r
+            //this.listen_query(options.query_lease_uuid, 'lease');\r
+            if (Debug) console.timeEnd("Listening_to_queries");\r
+\r
+            $("#ShedulerNodes tbody").html('<tr><td id="schdlr_frstTD" style="background:transparent; height:45px; border:none;"></td></tr>');\r
+        },\r
+\r
+        /* PLUGIN EVENTS */\r
+        // on_show like in querytable\r
+\r
+\r
+        /* GUI EVENTS */\r
+\r
+        // a function to bind events here: click change\r
+        // how to raise manifold events\r
+\r
+\r
+        /* GUI MANIPULATION */\r
+\r
+        // We advise you to write function to change behaviour of the GUI\r
+        // Will use naming helpers to access content _inside_ the plugin\r
+        // always refer to these functions in the remaining of the code\r
+\r
+        show_hide_button: function () {\r
+            // this.id, this.el, this.cl, this.elts\r
+            // same output as a jquery selector with some guarantees\r
+        },\r
+\r
+        //drawResources: function () {\r
+        drawLeases: function () {\r
+            \r
+            //if (Debug) this.debug('foo');\r
+            if (Debug) console.time("each:SchedulerResources");\r
+\r
+            //scheduler-reservation-table main table columns\r
+            totalColums = $("#scheduler-reservation-table thead tr th").length;\r
+            //var totalCell = [];\r
+            //for (var i = 0; i < totalColums; i++) { totalCell.push("<td></td>"); }\r
+            //var srt_body = [];\r
+            var totalCell = "";\r
+            for (var i = 0; i < totalColums; i++) totalCell +="<td></td>"; \r
+            var srt_body = "";\r
+            /*\r
+            $.each(SchedulerResources, function (i, group) {\r
+                console.log(group.groupName);\r
+                //var groupTR = $("#ShedulerNodes tbody").html('<tr><td class="no-image verticalIndex" rowspan="' + group.resources.length + '"><div class="verticalText">' + group.groupName + '</div></td><td id="schdlr_frstTD" class="info fixed"></td></tr>');\r
+                //var groupTR = $("#ShedulerNodes tbody").html('<tr><td class="no-image verticalIndex" rowspan="' + 30 + '"><div class="verticalText">' + group.groupName + '</div></td><td id="schdlr_frstTD" class="info fixed"></td></tr>');\r
+                var groupTR = $("#ShedulerNodes tbody").html('<tr><td id="schdlr_frstTD" class="info fixed"></td></tr>');\r
+                \r
+                //$.each(group.resources.slice(0,30), function (i, resource) {\r
+                $.each(group.resources, function (i, resource) {\r
+                    if (i == 0) {\r
+                        //$("#ShedulerNodes tbody tr:first").append('<td class="info fixed">' + resource.hostname + '</td>');\r
+                        $(groupTR).find("#schdlr_frstTD").html(resource.urn);\r
+                        //$(srt_body).html("<tr>" + totalCell + "</tr>");\r
+                    } else {\r
+                        $(groupTR).find("tr:last").after('<tr><td class="info fixed">' + resource.urn + '</td></tr>');\r
+                        //$(srt_body).find("tr:last").after("<tr>" + totalCell + "</tr>");\r
+                    }\r
+                    srt_body += "<tr>" + totalCell + "</tr>";\r
+                    //srt_body.push('<tr>'); srt_body = srt_body.concat(totalCell.concat()); srt_body.push('/<tr>');\r
+                });\r
+            });\r
+            */\r
+\r
+            srt_body += "<tr>" + totalCell + "</tr>";\r
+            //$("#scheduler-reservation-table tbody").html(srt_body.join(""));\r
+            //$("#scheduler-reservation-table tbody").append(srt_body);\r
+\r
+            if (Debug) console.timeEnd("each:SchedulerResources");\r
+            \r
+\r
+            $("#" + rsvrTblNm + " tbody tr").each(function (index) { $(this).attr("data-trindex", index); });\r
+\r
+        },\r
+\r
+        /* TEMPLATES */\r
+\r
+        // see in the html template\r
+        // How to load a template, use of mustache\r
+\r
+        /* QUERY HANDLERS */\r
+        loadWithDate: function () {\r
+            // only convention, not strictly enforced at the moment\r
+        },\r
+        // How to make sure the plugin is not desynchronized\r
+        // He should manifest its interest in filters, fields or records\r
+        // functions triggered only if the proper listen is done\r
+\r
+        /* all_ev QUERY HANDLERS Start */\r
+        on_all_ev_clear_records: function (data) {\r
+            //alert('all_ev clear_records');\r
+        },\r
+        on_all_ev_query_in_progress: function (data) {\r
+           // alert('all_ev query_in_progress');\r
+        },\r
+        on_all_ev_new_record: function (data) {\r
+            //alert('all_ev new_record');\r
+        },\r
+        on_all_ev_query_done: function (data) {\r
+            //alert('all_ev query_done');\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_all_ev_field_state_changed: function (data) {\r
+            //alert('all_ev query_done');\r
+        },\r
+        /* all_ev QUERY HANDLERS End */\r
+        /* all_resources QUERY HANDLERS Start */\r
+        on_all_resources_clear_records: function (data) {\r
+            //data is empty on load\r
+        },\r
+        on_all_resources_query_in_progress: function (data) {\r
+            //data is empty on load\r
+        },\r
+        on_all_resources_new_record: function (data) {\r
+            $("#ShedulerNodes tbody").find("tr:last").after('<tr><td class="info fixed">' + data.urn + '</td></tr>');\r
+            this.drawLeases();\r
+            //console.log(data);\r
+            var tmpGroup = lookup(SchedulerResources, 'groupName', data.type);\r
+            if (tmpGroup == null) {\r
+                tmpGroup = { groupName: data.type, resources: [] };\r
+                SchedulerResources.push(tmpGroup);\r
+                //if (data.type != "node")  alert('not all node');\r
+            }\r
+            tmpGroup.resources.push(data);\r
+            //alert('new_record');\r
+        },\r
+        on_all_resources_query_done: function (data) {\r
+            //this.drawResources();\r
+            //data is empty on load\r
+            /* GUI setup and event binding */\r
+            this._initUI();\r
+            this._SetPeriodInPage(init_start_visible_index, init_end_visible_index);\r
+            this.loadWithDate();\r
+        },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_all_resources_field_state_changed: function (data) {\r
+            //alert('all_resources query_done');\r
+        },\r
+        /* all_resources QUERY HANDLERS End */\r
+        /* lease QUERY HANDLERS Start */\r
+        on_lease_clear_records: function (data) { console.log('clear_records'); },\r
+        on_lease_query_in_progress: function (data) { console.log('lease_query_in_progress'); },\r
+        on_lease_new_record: function (data) { console.log('lease_new_record'); },\r
+        on_lease_query_done: function (data) { console.log('lease_query_done'); },\r
+        //another plugin has modified something, that requires you to update your display. \r
+        on_lease_field_state_changed: function (data) { console.log('lease_field_state_changed'); },\r
+        /* lease QUERY HANDLERS End */\r
+\r
+\r
+        // no prefix\r
+\r
+        on_filter_added: function (filter) {\r
+\r
+        },\r
+\r
+        // ... be sure to list all events here\r
+\r
+        /* RECORD HANDLERS */\r
+        on_all_new_record: function (record) {\r
+            //\r
+            alert('on_all_new_record');\r
+        },\r
+\r
+        debug : function (log_txt) {\r
+            if (typeof window.console != 'undefined') {\r
+                console.debug(log_txt);\r
+            }\r
+        },\r
+\r
+        /* INTERNAL FUNCTIONS */\r
+        _initUI: function () {\r
+            if (Debug) console.time("_initUI");\r
+            //fix margins in tables\r
+            mtNodesTbl = $("#" + rsvrTblNm + " tr:first").outerHeight() + 6;\r
+            mtSchrollCon = $("#nodes").outerWidth();\r
+            $("#nodes").css("margin-top", mtNodesTbl);\r
+            $("#reservation-table-scroll-container").css("margin-left", mtSchrollCon);\r
+            SetPerFun = this._SetPeriodInPage;\r
+            //slider\r
+            $("#time-range").slider({\r
+                range: true,\r
+                min: 0,\r
+                max: 24,\r
+                step: 0.5,\r
+                values: [init_start_visible_index, init_end_visible_index],\r
+                slide: function (event, ui) {\r
+                    SetPerFun(ui.values[0], ui.values[1]);\r
+                }\r
+            });\r
+            $("#DateToRes").datepicker({\r
+                dateFormat: "yy-mm-dd",\r
+                minDate: 0,\r
+                numberOfMonths: 3\r
+            }).change(function () {\r
+                //Scheduler2.loadWithDate();\r
+            }).click(function () {\r
+                $("#ui-datepicker-div").css("z-index", 5);\r
+            });\r
+            //other stuff\r
+            fixOddEvenClasses();\r
+            $("#" + rsvrTblNm + " td:not([class])").addClass("free");\r
+            if (Debug) console.timeEnd("_initUI");\r
+        },\r
+        _SetPeriodInPage: function (start, end) {\r
+            if (Debug) console.time("_SetPeriodInPage");\r
+            ClearTableSelection();\r
+            $("#lbltime").html(GetTimeFromInt(start) + " - " + GetTimeFromInt(end));\r
+            \r
+            var start_visible_index = (start * schdlr_PartsInOneHour) + 1;\r
+            var end_visible_index = (end * schdlr_PartsInOneHour);\r
+\r
+            //hide - show\r
+            for (i = 0; i < start_visible_index; i++) {\r
+                $("#" + rsvrTblNm + " td:nth-child(" + i + "), #" + rsvrTblNm + " th:nth-child(" + i + ")").hide();\r
+            }\r
+            for (i = end_visible_index + 1; i <= schdlr_totalColums; i++) {\r
+                $("#" + rsvrTblNm + " td:nth-child(" + i + "), #" + rsvrTblNm + " th:nth-child(" + i + ")").hide();\r
+            }\r
+            /*$("#" + rsvrTblNm + " td:not([class*='info']), #" + rsvrTblNm + " th:not([class*='fixed'])").hide();*/\r
+            for (i = start_visible_index; i <= end_visible_index; i++) {\r
+                $("#" + rsvrTblNm + " td:nth-child(" + i + "), #" + rsvrTblNm + " th:nth-child(" + i + ")").show();\r
+            }\r
+\r
+            if ($("#" + rsvrTblNm + " th:visible:first").width() > 105) {\r
+                $("#" + rsvrTblNm + " th span").css("display", "inline")\r
+            } else {\r
+                $("#" + rsvrTblNm + " th span").css("display", "block");\r
+            }\r
+            mtNodesTbl = $("#" + rsvrTblNm + " tr:first").outerHeight() + 6;\r
+            $("#nodes").css("margin-top", mtNodesTbl);\r
+            //$("#scroll_container").width($("#Search").width() - $("#nodes").width());\r
+            //$("#nodes th").height($("#tblReservation th:visible:first").height() - 2);\r
+            if (Debug) console.timeEnd("_SetPeriodInPage");\r
+        }\r
+    });\r
+\r
+    //Sched2 = new Scheduler2();\r
+\r
+    /* Plugin registration */\r
+    $.plugin('Scheduler2', Scheduler2);\r
+\r
+    // TODO Here use cases for instanciating plugins in different ways like in the pastie.\r
+\r
+\r
+})(jQuery);\r
+\r
+\r
+\r
diff --git a/plugins/scheduler2/static/js/selectRangeWorker.js b/plugins/scheduler2/static/js/selectRangeWorker.js
new file mode 100755 (executable)
index 0000000..5f28270
--- /dev/null
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/plugins/scheduler2/static/js/slider/jquery-ui-1.10.3.slider.min.js b/plugins/scheduler2/static/js/slider/jquery-ui-1.10.3.slider.min.js
new file mode 100755 (executable)
index 0000000..b2ea00e
--- /dev/null
@@ -0,0 +1,6 @@
+/*! jQuery UI - v1.10.3 - 2013-11-26
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.slider.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,n=s.name,t.href&&n&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,a){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),a&&a.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var a,s,n=e(this[0]);n.length&&n[0]!==document;){if(a=n.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,a){return!!e.data(t,a[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var a=e.attr(t,"tabindex"),s=isNaN(a);return(s||a>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,a){function s(t,i,a,s){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,a&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===a?["Left","Right"]:["Top","Bottom"],r=a.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+a]=function(i){return i===t?o["inner"+a].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+a]=function(t,i){return"number"!=typeof t?o["outer"+a].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,a){var s,n=e.ui[t].prototype;for(s in a)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,a[s]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;s.length>a;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var a=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[a]>0?!0:(t[a]=1,s=t[a]>0,t[a]=0,s)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],n=u+"-"+i,a||(a=s,s=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(i,a){return e.isFunction(a)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,n=this._superApply;return this._super=e,this._superApply=t,i=a.apply(this,arguments),this._super=s,this._superApply=n,i}}(),t):(l[i]=a,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&"_"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var a,n,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},a=i.split("."),i=a.shift(),a.length){for(n=o[i]=e.widget.extend({},this.options[i]),r=0;a.length-1>r;r++)n[a[r]]=n[a[r]]||{},n=n[a[r]];if(i=a.pop(),s===t)return n[i]===t?null:n[i];n[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,a){var n,r=this;"boolean"!=typeof i&&(a=s,s=i,i=!1),a?(s=n=e(s),this.bindings=this.bindings.add(s)):(a=s,s=this.element,n=this.widget()),e.each(a,function(a,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=a.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?n.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var r,o=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),r=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),r&&e.effects&&e.effects.effect[o]?s[t](a):o!==t&&s[o]?s[o](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,a=1===i.which,n="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return a&&!n&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),n="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=s.values&&s.values.length||1,a.length>i&&(a.slice(i).remove(),a=a.slice(0,i)),t=a.length;i>t;t++)r.push(n);this.handles=a.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):this.range=e([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,a,n,r,o,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(a>i||a===i&&(t===u._lastChangedValue||u.values(t)===c.min))&&(a=i,n=e(this),r=t)}),o=this._start(t,r),o===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,n.addClass("ui-state-active").focus(),h=n.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-n.width()/2,top:t.pageY-h.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,a,n;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),a=this._valueMax()-this._valueMin(),n=this._valueMin()+s*a,this._trimAlignValue(n)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,a,n;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(a=this.values(),a[t]=i,n=this._trigger("slide",e,{handle:this.handles[t],value:i,values:a}),s=this.values(t?0:1),n!==!1&&this.values(t,i,!0))):i!==this.value()&&(n=this._trigger("slide",e,{handle:this.handles[t],value:i}),n!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var s,a,n;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,a=arguments[0],n=0;s.length>n;n+=1)s[n]=this._trimAlignValue(a[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,i){var s,a=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(a=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;a>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,a,n,r=this.options.range,o=this.options,h=this,l=this._animateOff?!1:o.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,o.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i}):(s=this.value(),a=this._valueMin(),n=this._valueMax(),i=n!==a?100*((s-a)/(n-a)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,o.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},o.animate),"max"===r&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:o.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},o.animate),"max"===r&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:o.animate}))},_handleEvents:{keydown:function(i){var s,a,n,r,o=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),s=this._start(i,o),s===!1))return}switch(r=this.options.step,a=n=this.options.values&&this.options.values.length?this.values(o):this.value(),i.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(a+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(a-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(a===this._valueMax())return;n=this._trimAlignValue(a+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(a===this._valueMin())return;n=this._trimAlignValue(a-r)}this._slide(i,o,n)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}})})(jQuery);
\ No newline at end of file
diff --git a/plugins/scheduler2/templates/scheduler.html b/plugins/scheduler2/templates/scheduler.html
new file mode 100755 (executable)
index 0000000..9127a9d
--- /dev/null
@@ -0,0 +1,107 @@
+<div id="plugin-{{ domid }}-loader" style="text-align:center;">\r
+    <img src="../../static/img/loading-7b6dc55620a355b55b835f6b4c300f9b.gif" alt="loading" style="width:100px;" />\r
+    <h3>Loading Data...</h3>\r
+</div>\r
+<div id="plugin-{{ domid }}" class="" ng-app="myApp" style="display:none;">\r
+    <div class="row m-b">\r
+        <div class="col-md-1">\r
+            <label for="inputEmail3" class="col-sm-2 control-label">Date</label>\r
+        </div>\r
+        <div class="col-md-9">\r
+            <input id="DateToRes" type="text" class="form-control" placeholder="Reservation Date">\r
+            <span class="glyphicon glyphicon-calendar"></span>\r
+        </div>\r
+        <div class="col-md-2 text-center">\r
+            <div id="TopologyModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">\r
+                <div class="modal-dialog">\r
+                    <div class="modal-header">\r
+                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\r
+                        <h4 class="modal-title" id="myModalLabel">Topology</h4>\r
+                    </div>\r
+                    <div class="modal-body">\r
+                        <img src="../../static/img/nitos_topo.png" alt="nitos topology" style="width:100%;" />\r
+                    </div>\r
+                </div><!-- /.modal-dialog -->\r
+            </div><!-- /.modal TopologyModal -->\r
+            <button type="button" class="btn btn-primary btn-md" data-toggle="modal" data-target="#TopologyModal">Topology</button>\r
+\r
+        </div>\r
+    </div>\r
+    <!--<div class="row m-b">\r
+        <div class="col-md-1">\r
+            <label for="inputEmail3" class="col-sm-1 control-label">Time</label>\r
+        </div>\r
+        <div class="col-md-9">\r
+            <div id="time-range"></div>\r
+        </div>\r
+        <div class="col-md-2">\r
+            <span id="lbltime" class="label label-primary"></span>\r
+        </div>\r
+    </div>-->\r
+    <div id="SchedulerCtrl" ng-controller="SchedulerCtrl" class='query-editor-spacer'>\r
+        <div class="sliderContainer">\r
+            <div id="tblSlider"></div>\r
+        </div>\r
+        <div class="table-responsive">\r
+            <table id="scheduler-reservation-table" class="table table-bordered table-condensed">\r
+                <thead>\r
+                    <tr>\r
+                        <th>#</th>\r
+                        <th ng-repeat="slot in slots" >\r
+                            {[{ slot.time }]}\r
+                        </th>\r
+                    </tr>\r
+                </thead>\r
+                <tbody>\r
+                    <tr ng-repeat="resource in resources" ng-class-odd="''" ng-class-even="'even'">\r
+                        <th data-resourceid="{[{ resource.id }]}" data-resourceindex="{[{ resource.index }]}">{[{ resource.name }]}</th>\r
+                        <td ng-repeat="lease in resource.leases" data-slotid="{[{ lease.id }]}" ng-class="{{ 'lease.status' }}"></td>\r
+                    </tr>\r
+                </tbody>\r
+            </table>\r
+        </div>\r
+        {% comment %}\r
+        <div id="reservation-table-scroll-container">\r
+            <table id='{{domid}}-reservation-table' class='table table-bordered'>\r
+                <thead>\r
+                    <tr>\r
+                        {% for ts in time_slots %}\r
+                        <th class='center info'>{{ ts|safe }}</th>\r
+                        {% endfor %}\r
+                    </tr>\r
+                </thead>\r
+                <tbody>\r
+\r
+                    {% for itms in nodes %}\r
+                    {% for n in itms.1 %}\r
+                    <tr data-trindex="">\r
+                        {% for ts in time_slots %}\r
+                        {% if n == 'node020' %}\r
+                        <td class="maintenance closed" data-tdindex="{{forloop.counter}}"></td>\r
+                        {% elif n == 'node023' or n == 'node030' %}\r
+                        <td class="closed" data-tdindex="{{forloop.counter}}"></td>\r
+                        {% else %}\r
+                        <td class="" data-tdindex="{{forloop.counter}}"></td>\r
+                        {% endif %}\r
+                        {% endfor %}\r
+                    </tr>\r
+                    {% endfor %}\r
+                    {% endfor %}\r
+                </tbody>\r
+            </table>\r
+        </div>\r
+        {% endcomment  %}\r
+\r
+        <div class="legend">\r
+            <ol>\r
+                <li class="free">free</li>\r
+                <li class="selected">selected</li>\r
+                <li class="closed">reserved</li>\r
+                <li class="maintenance">maintenance</li>\r
+            </ol>\r
+        </div>\r
+    </div><!-- / scheduler plugin -->\r
+    <script type="text/javascript">\r
+        //alert("1");\r
+    </script>\r
+</div>
\ No newline at end of file
diff --git a/plugins/testbeds/__init__.py b/plugins/testbeds/__init__.py
new file mode 100644 (file)
index 0000000..6b2b89d
--- /dev/null
@@ -0,0 +1,37 @@
+from unfold.plugin import Plugin
+
+class TestbedsPlugin(Plugin):
+    
+    def __init__ (self, query=None, query_all=None, query_network=None, **settings):
+        Plugin.__init__ (self, **settings)
+
+        # Until we have a proper way to access queries in Python
+        self.query              = query
+        self.query_network      = query_network
+        self.query_network_uuid = query_network.query_uuid if query_network else None
+
+        self.query_all          = query_all
+        self.query_all_uuid     = query_all.query_uuid if query_all else None
+
+    def template_file (self):
+        return "testbeds.html"
+
+    def requirements (self):
+        reqs = {
+            'js_files' : [
+                'js/testbeds.js'
+            ],
+#            'css_files': [
+#                'css/myplugin.css',
+#            ]
+        }
+        return reqs
+
+    def json_settings_list (self):
+        # query_uuid will pass self.query results to the javascript
+        # and will be available as "record" in :
+        # on_new_record: function(record)
+        return ['plugin_uuid', 'domid', 'query_uuid', 'query_all_uuid', 'query_network_uuid']
+
+    def export_json_settings (self):
+        return True
diff --git a/plugins/testbeds/static/css/myplugin.css b/plugins/testbeds/static/css/myplugin.css
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/plugins/testbeds/static/js/testbeds.js b/plugins/testbeds/static/js/testbeds.js
new file mode 100644 (file)
index 0000000..b977127
--- /dev/null
@@ -0,0 +1,206 @@
+/**
+ * TestbedsPlugin: List of testbeds plugin
+ * Version:     0.1
+ * Description: TODO -> generalize to a list of possible filters
+ *              This file is part of the Manifold project 
+ * Requires:    js/plugin.js
+ * URL:         http://www.myslice.info
+ * Author:      Loïc Baron <loic.baron@lip6.fr>
+ * Copyright:   Copyright 2012-2013 UPMC Sorbonne Universités
+ * License:     GPLv3
+ */
+
+(function($){
+
+    var TestbedsPlugin = Plugin.extend({
+
+        /** XXX to check
+         * @brief Plugin constructor
+         * @param options : an associative array of setting values
+         * @param element : 
+         * @return : a jQuery collection of objects on which the plugin is
+         *     applied, which allows to maintain chainability of calls
+         */
+        init: function(options, element) {
+               // for debugging tools
+               this.classname="testbedsplugin";
+            // Call the parent constructor, see FAQ when forgotten
+            this._super(options, element);
+
+            /* Member variables */
+            this.filters = Array();
+
+            /* Plugin events */
+
+            /* Setup query and record handlers */
+
+            // Explain this will allow query events to be handled
+            // What happens when we don't define some events ?
+            // Some can be less efficient
+            this.listen_query(options.query_uuid);
+            this.listen_query(options.query_all_uuid, 'all');
+            this.listen_query(options.query_network_uuid, 'network');
+
+            /* GUI setup and event binding */
+            // call function
+
+        },
+
+        /* PLUGIN EVENTS */
+        // on_show like in querytable
+
+
+        /* GUI EVENTS */
+
+        // a function to bind events here: click change
+        // how to raise manifold events
+
+
+        /* GUI MANIPULATION */
+
+        // We advise you to write function to change behaviour of the GUI
+        // Will use naming helpers to access content _inside_ the plugin
+        // always refer to these functions in the remaining of the code
+
+        show_hide_button: function() 
+        {
+            // this.id, this.el, this.cl, this.elts
+            // same output as a jquery selector with some guarantees
+        },
+
+        /* TEMPLATES */
+
+        // see in the html template
+        // How to load a template, use of mustache
+
+        /* QUERY HANDLERS */
+
+        // How to make sure the plugin is not desynchronized
+        // He should manifest its interest in filters, fields or records
+        // functions triggered only if the proper listen is done
+
+        // no prefix
+
+        /* When a filter is added/removed, update the list of filters local to the plugin */
+        on_filter_added: function(filter)
+        {
+            this.filters.push(filter);
+            if(filter[0]=='network_hrn'){
+                if(filter[1]=='included'){
+                    $.each(filter[2], function(value){
+                        $("#testbeds-filter_"+value).addClass("active");
+                    });
+                }else if(filter[1]=='=' || filter[1]=='=='){
+                    $("#testbeds-filter_"+filter[2]).addClass("active");
+                }
+            }
+        },
+        on_filter_removed: function(filter)
+        {
+            this.filters = $.grep(this.filters, function(x) {
+                return x == filter;
+            });
+            if(filter[0]=='network_hrn'){
+                if(filter[1]=='included'){
+                    $.each(filter[2], function(value){
+                        $("#testbeds-filter_"+value).removeClass("active");
+                    });
+                }else if(filter[1]=='=' || filter[1]=='=='){
+                    $("#testbeds-filter_"+filter[2]).removeClass("active");
+                }
+            }
+        },
+
+        // ... be sure to list all events here
+
+        /* RECORD HANDLERS */
+        on_network_new_record: function(record)
+        {
+            row  = '<a href="#" class="list-group-item sl-platform" id="testbeds-filter_'+record["network_hrn"]+'" data-platform="'+record["network_hrn"]+'">';
+            row += '<span class="list-group-item-heading">'+record["platform"]+'</span>';
+            //row += '<span class="list-group-item-heading">'+record["network_hrn"]+'</span></a>';
+            row += '<p class="list-group-item-text">'+record["network_hrn"]+'</p></a>';
+            $('#testbeds-filter').append(row);
+        },
+
+        /* When the network query is done, add the click event to the elements  */
+        on_network_query_done: function() {
+            var self = this;
+            console.log('query network DONE');
+            $("[id^='testbeds-filter_']").on('click',function(e) {
+                $(this).toggleClass("active");
+
+                // avoid multiple calls when an event is raised to manifold.js
+                e.stopPropagation();
+
+                value = this.dataset['platform'];
+                // handle the hrn that include . in their name (has to be in sync with the data from SFA)
+                //value = value.replace(/\./g,"\\.");
+                key = "network_hrn";
+                op = "included";
+                return $(this).hasClass('active') ? self._addFilter(key, op, value) : self._removeFilter(key, op, value);
+            });
+           
+        },
+
+        /* INTERNAL FUNCTIONS */
+        _dummy: function() {
+            // only convention, not strictly enforced at the moment
+        },
+        _addFilter: function(key, op, value)
+        {
+            console.log("add "+value);
+            var self = this;
+            values = Array();
+            // get the previous list of values for this key, ex: [ple,nitos]
+            // remove the previous filter
+            network_filter = $.grep(this.filters, function(x) {
+                return x[0] == "network_hrn";
+            });
+            if(network_filter.length > 0){
+                $.each(network_filter, function(i,f){
+                    values = f[2];
+                    manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, [key, op, values]);
+                });
+            }
+            // Add the new value to list of values, ex: wilab
+            values.push(value);
+            
+            // Update the filter with the new list of values, ex: [ple,nitos,wilab]
+            manifold.raise_event(this.options.query_uuid, FILTER_ADDED, [key, op, values]);
+        },
+        _removeFilter: function(key, op, value)
+        {
+            console.log("remove "+value);
+            var self = this;
+            values = Array();
+            // get the previous list of values for this key, ex: [ple,nitos,wilab]
+            // remove the previous filter
+            network_filter = $.grep(this.filters, function(x) {
+                return x[0] == "network_hrn";
+            });
+            if(network_filter.length > 0){
+                $.each(network_filter, function(i,f){
+                    values = f[2];
+                    manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, [key, op, values]);
+                });
+            }
+
+            // remove the value from the list of values, ex: wilab
+            values = $.grep(values, function(x) {
+                return x != value;
+            });
+            if(values.length>0){
+                // Update the filter with the new list of values, ex: [ple,nitos]
+                manifold.raise_event(this.options.query_uuid, FILTER_ADDED, [key, op, values]);
+            }
+        }
+
+    });
+
+    /* Plugin registration */
+    $.plugin('TestbedsPlugin', TestbedsPlugin);
+
+    // TODO Here use cases for instanciating plugins in different ways like in the pastie.
+
+})(jQuery);
diff --git a/plugins/testbeds/templates/testbeds.html b/plugins/testbeds/templates/testbeds.html
new file mode 100644 (file)
index 0000000..fe8c2ea
--- /dev/null
@@ -0,0 +1,3 @@
+<div id={{ domid }}>
+<div class="list-group-item sl-platform"><span class="list-group-item-heading">Testbeds</span></div>
+</div>
diff --git a/portal/newsview.py b/portal/newsview.py
new file mode 100644 (file)
index 0000000..ace1f53
--- /dev/null
@@ -0,0 +1,32 @@
+from django.core.context_processors import csrf
+from django.http import HttpResponseRedirect
+from django.contrib.auth import authenticate, login, logout
+from django.template import RequestContext
+from django.shortcuts import render_to_response
+from django.shortcuts import render
+
+from unfold.loginrequired import FreeAccessView
+
+from manifoldapi.manifoldresult import ManifoldResult
+from myslice.configengine import ConfigEngine
+
+from myslice.theme import ThemeView
+
+class NewsView (FreeAccessView, ThemeView):
+    template_name = 'news.html'
+
+    def get (self, request, state=None):
+        env = {}
+        
+        if request.user.is_authenticated(): 
+            env['person'] = self.request.user
+            env['username'] = self.request.user
+        else: 
+            env['person'] = None
+            env['username'] = None
+    
+        env['theme'] = self.theme
+        env['section'] = "News"
+
+        return render_to_response(self.template, env, context_instance=RequestContext(request))
+
diff --git a/portal/slicetabusers.py b/portal/slicetabusers.py
new file mode 100644 (file)
index 0000000..51623cf
--- /dev/null
@@ -0,0 +1,56 @@
+from django.template                 import RequestContext
+from django.shortcuts                import render_to_response
+
+from manifold.core.query             import Query, AnalyzedQuery
+from manifoldapi.manifoldapi         import execute_query
+
+from django.views.generic.base      import TemplateView
+
+from unfold.loginrequired           import LoginRequiredView
+from django.http import HttpResponse
+from django.shortcuts import render
+
+from unfold.page                     import Page
+from manifold.core.query             import Query, AnalyzedQuery
+from manifoldapi.manifoldapi         import execute_query
+
+from myslice.theme import ThemeView
+import json
+
+class SliceUserView (LoginRequiredView, ThemeView):
+    template_name = "slice-tab-users-view.html"
+    
+    def get(self, request, slicename):
+        if request.user.is_authenticated():
+           # user_query  = Query().get('user').select('user_hrn','parent_authority').filter_by('user_hrn','==','$user_hrn')
+            #user_details = execute_query(self.request, user_query)
+            # if sfa returns None
+            #if user_details[0]['parent_authority'] is None:
+                # find in local DB 
+                user_query  = Query().get('local:user').select('config')
+                user_details = execute_query(request, user_query)
+                for user_config in user_details:
+                        config = json.loads(user_config['config'])
+                        config['authority'] = config.get('authority')
+                        user_details[0]['parent_authority'] = config['authority']
+
+        ## check user is pi or not
+        platform_query  = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled')
+        account_query  = Query().get('local:account').select('user_id','platform_id','auth_type','config')
+        platform_details = execute_query(self.request, platform_query)
+        account_details = execute_query(self.request, account_query)
+        for platform_detail in platform_details:
+            for account_detail in account_details:
+                if platform_detail['platform_id'] == account_detail['platform_id']:
+                    if 'config' in account_detail and account_detail['config'] is not '':
+                        account_config = json.loads(account_detail['config'])
+                        if 'myslice' in platform_detail['platform']:
+                            acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
+
+        # assigning values
+        if acc_auth_cred == {}:
+            pi = "is_not_pi"
+        else:
+            pi = "is_pi"
+
+        return render_to_response(self.template, {"slice": slicename, "user_details":user_details[0], "pi":pi, "theme": self.theme, "username": request.user, "section":"users"}, context_instance=RequestContext(request))
diff --git a/portal/static/css/fantaastic.css b/portal/static/css/fantaastic.css
new file mode 100644 (file)
index 0000000..411234b
--- /dev/null
@@ -0,0 +1,483 @@
+html { height: 100% }
+
+body {
+    background-color:white;
+    color:black;
+    margin:0;
+    padding:0;
+    height: 100%;
+}
+a, a:active, a:focus {
+    outline: 0;
+}
+
+h1 {
+    border-bottom:1px solid #DDDDDD;
+    padding:0 0 0 0;
+    margin:0 0 0 0;
+    font-size:14pt;
+}
+h1 img {
+    vertical-align:middle;
+    margin-bottom:4px;
+    margin-right:10px;
+}
+h2 {
+    margin:0 0 15px 0;
+    font-size:13pt;
+    color:#0C0045;
+}
+h3 {
+    font-size:11pt;
+    color:#201E62;
+}
+button {
+    font-size:11pt;
+}
+div.wrapper {
+    width:980px;
+    margin:0 auto;
+    position:relative;
+}
+div.container {
+    width:980px;
+    margin:25px auto;
+}
+div.wide {
+    margin:25px auto;
+    padding:0 25px;
+}
+
+span.label {
+    font-size:11pt;
+    color:gray;
+    font-weight:normal;
+    padding:0;
+}
+/***** Notifications *****/
+.warning {
+    border: 1px solid red;
+    margin: 20px 60px;
+    padding: 10px 20px;
+    color: red;
+    background-color: #f2dbdb;
+    text-align: center;
+}
+/* HEADER */
+div#header {
+    height:100px;
+    background-color:white;
+}
+
+div#secondary {
+    
+}
+
+div#secondary ul {
+    position:absolute;
+    top:20px;
+    right:0;
+}
+
+div#secondary li {
+    font-size:10pt;
+    float:left;
+    list-style:none;
+    margin-right:30px;
+}
+div#secondary li a {
+    color:black;
+}
+div#secondary li a:hover {
+    color:#270A5A;
+    text-decoration:none;
+}
+div#secondary li:last-child {
+    margin-right:0;
+}
+
+div#navigation {
+    background-color:black;
+    width:100%;
+    height:40px;
+}
+div#navigation div.wrapper {
+    text-align:center;
+}
+div#navigation ul {
+    margin:0;
+    padding:0;
+    display: inline-block;
+    list-style-type: none;
+    white-space: nowrap;
+}
+
+div#navigation li {
+    color:white;
+    font-family:helvetica, sans-serif;
+    font-size:10pt ;
+    font-weight:normal;
+    line-height:0.8em;
+    letter-spacing:0.6pt;
+    list-style:none;
+    float:left;
+    padding:0;
+    margin:15px 50px 0 0;
+}
+div#navigation li a {
+    color:white;
+}
+div#navigation li a:hover {
+    text-decoration:none;
+    color:#B8B2FF;
+}
+div#navigation li:last-child {
+    margin-right:0;
+}
+
+div#navigation li.active {
+       padding:5px;
+    padding-top: 15px;
+    min-height: 40px;
+    margin-top: 0px;
+       background-color:gray;
+       color:#FF0000;
+}
+div#navigation li.slices {
+    position:relative;
+    cursor:pointer;
+}
+div#navigation .dropdown-menu {
+    color:white;
+    padding:0 15px 15px 15px;
+    margin-top:5px;
+    margin-left:-16px;
+    background-color:black;
+}
+div#navigation .dropdown-menu a {
+    color:white;
+}
+
+div#menu-slice-list{
+    display:none;
+    position:absolute;
+    background-color:black;
+    padding:15px;
+    left:-15px;
+    z-index:10;
+}
+
+div#navigation .dropdown-menu li:first-child {
+    border-bottom:1px solid white;
+    padding-bottom:5px;
+     
+}
+/* HOME DASHBOARD */
+div#home-dashboard {
+    color:black;
+    margin:0 auto 25px auto;
+}
+div#home-dashboard table {
+    margin:25px;
+    width:100%;
+}
+div#home-dashboard table td {
+    text-align:center;
+    padding:15px 0;
+    width:33%;
+}
+div#home-dashboard table tr:first-child td {
+    font-size:12pt;
+    font-weight:bold;
+    color:#270A5A;
+}
+div#home-dashboard table tr:last-child td {
+    vertical-align:top;
+    padding:25px 0;
+}
+div#home-dashboard table tr:last-child td.logged-in {
+    border-right:1px solid #DDDDDD;
+    padding:25px;
+}
+div#home-dashboard table tr:last-child td.support {
+    border-left:1px solid #DDDDDD;
+    padding:25px;
+}
+div#home-dashboard table tr:last-child td:first-child {
+}
+div#home-dashboard table tr:last-child td:last-child {
+    border-right:0;
+}
+div#home-dashboard table tr:last-child td.logged-in div {
+    text-align:left;
+    padding:25px 0;
+}
+div#home-dashboard table tr:last-child td.support div {
+    text-align:left;
+    padding:25px 0;
+}
+div#home-dashboard div.login-widget {
+    padding:20px;
+}
+div#home-dashboard table td.support {
+}
+div#home-dashboard table td.support a {
+}
+div#home-dashboard table td.support a:hover {
+    text-decoration:none;
+}
+
+div#home-dashboard div#manager {
+    display:none;
+}
+
+div#home-dashboard div#home-slice-list {
+    margin:25px 0;
+    padding:0 25px;
+    text-align:left;
+}
+div#home-dashboard div#home-slice-list ul {
+    list-style: none;
+    padding:0;
+    margin:0;
+}
+div#home-dashboard div#home-slice-list li {
+    
+}
+
+.login-submit {
+    vertical-align:middle;
+    padding:0;
+}
+.lost-password {
+    font-size:10pt;
+    color:#CCCCCC;
+    text-align:right;
+    padding:0px;
+}
+.lost-password a {
+}
+.login-signup {
+    border-top:1px solid #CCCCCC;
+    text-align:center;
+    margin-top:15px;
+    padding:5px 0 0 0;
+}
+/**/
+
+/**/
+/* WELL */
+div.well {
+}
+/**/
+/* BUTTON */
+.btn.btn-default {
+    font-weight: bold;
+}
+
+.btn.btn-default:hover {
+    font-weight: bold;
+}
+/**/
+/* TABLE */
+table.table {
+    margin:0;
+}
+table.table thead {
+    padding:0;
+}
+table.table tbody {
+    padding:0;
+}
+table.table tr {
+    padding:0;
+}
+table.table td {
+    padding:0;
+}
+/* INSTITUTION */
+div#institution {
+    color:black;
+}
+.form-hint {
+    font-size:11pt;
+    font-style:italic;
+    color:gray;
+}
+
+
+.form-hint {
+    font-size:11pt;
+    font-style:italic;
+    color:gray;
+}
+
+
+
+/* TICKET REQUEST */
+div#ticket-request {
+    color:black;
+}
+.form-hint {
+    font-size:11pt;
+    font-style:italic;
+    color:gray;
+}
+div#ticket-request p {
+    margin:20px 0;
+}
+
+ul.nav-tabs {}
+ul.nav-tabs ul {}
+ul.nav-tabs li {}
+
+ul.nav-section li a {
+    border-bottom:0;
+}
+ul.nav-section li:first-child {
+    padding:0;
+}
+ul.nav-section li:first-child a {
+    font-weight:bold;
+    padding:6px 15px 4px 15px;
+}
+ul.nav-section li:first-child.active a {
+    padding:6px 15px 3px 15px;
+}
+ul.nav-section li:first-child img {
+    margin:0 4px 1px 0;
+    padding:0;
+}
+
+ul.nav-resources {
+    margin:15px 0;
+}
+ul.nav-resources a {
+    padding: 4px 10px 5px 10px;
+}
+
+/* SLICE VIEW */
+
+
+div#slice-view {
+    margin:0;
+}
+div.list-group-item {
+    border:0;
+    background-color:white;
+    font-weight:bold;
+    padding-left:0;
+}
+a.list-group-item {
+    border:0;
+    background-color:white;
+    padding:3px 0 3px 10px;
+    border-left:2pt white solid;
+}
+a.list-group-item.active, a.list-group-item.active:hover {
+    font-weight: bold;
+    color:black;
+    background-color:transparent;
+    border-left:2pt blue solid;
+}
+a.list-group-item.active:hover {
+    background-color:#dddddd;
+}
+a.list-group-item:hover {
+    border-left:2pt blue solid;
+}
+a.list-group-item p.list-group-item-text {
+    font-size:9pt;
+    font-style:italic;
+    font-weight: normal;
+    color: black !important;
+}
+
+div#slice-info {
+    margin-top:25px;
+}
+div#slice-info table {
+    width:100%;
+    margin:0 auto;
+}
+div#slice-info table td:first-child {
+    text-align:right;
+    font-weight:bold;
+    padding-right:15px;
+}
+div#slice-info td {
+    padding:5px;
+}
+
+/* SLICE VIEW sections */
+.slice-sections, .slice-pending {
+    margin:0;
+    padding:0;
+}
+.slice-sections ul, .slice-pending ul {
+    margin:0;
+    padding:0;
+}
+.slice-pending ul {
+    width:400px;
+    margin:0 auto 15px auto;
+}
+.slice-sections li {
+    text-align:left;
+    margin:0;
+    padding:0;
+}
+.slice-pending li {
+    padding-right:15px;
+}
+.slice-sections li a, .slice-pending li a {
+    font-size:14px;
+    color:black;
+    padding:0;
+}
+.slice-sections li.active a, .slice-pending li.active a  {
+    color:#201E62;
+    background-color:#EFEFEF;
+    text-decoration:underline;
+    padding:0;
+}
+.slice-sections ul.nav-pills li a:hover, .slice-pending ul.nav-pills li a:hover {
+    text-decoration:underline;
+    background-color:#EFEFEF;
+    color:black;
+}
+.slice-sections ul.nav-pills li.active, .slice-pending ul.nav-pills li.active {
+
+}
+.slice-sections li:first-child, .slice-sections li:first-child a {
+    color:#201E62;
+    font-weight:bold;
+}
+.slice-experiment {
+    text-align:right;
+    padding:0;
+}
+.slice-experiment button {
+    margin:3px 0 0 0;
+    background-color:#CC4125;
+    color:white;
+}
+
+.slice-pending {
+}
+.slice-pending button {
+    font-size:9pt;
+    margin:-2px 0 0 0;
+    padding:3px 5px;
+}
+.slice-pending button.apply {
+}
+.slice-pending button.clear {
+}
+tr.active, tr.active td {
+    background-color:#FFFFCC !important;
+}
+div.dataTables_filter label{
+    float:left;
+    width:400px;
+}
diff --git a/portal/static/img/fantaastic-s.png b/portal/static/img/fantaastic-s.png
new file mode 100644 (file)
index 0000000..ea33949
Binary files /dev/null and b/portal/static/img/fantaastic-s.png differ
diff --git a/portal/static/img/favicon.ico b/portal/static/img/favicon.ico
new file mode 100644 (file)
index 0000000..a2754aa
Binary files /dev/null and b/portal/static/img/favicon.ico differ
diff --git a/portal/static/img/fibre/br.png b/portal/static/img/fibre/br.png
new file mode 100644 (file)
index 0000000..4225053
Binary files /dev/null and b/portal/static/img/fibre/br.png differ
diff --git a/portal/static/img/fibre/cafe.jpg b/portal/static/img/fibre/cafe.jpg
new file mode 100644 (file)
index 0000000..c73e6f1
Binary files /dev/null and b/portal/static/img/fibre/cafe.jpg differ
diff --git a/portal/static/img/fibre/eu.png b/portal/static/img/fibre/eu.png
new file mode 100644 (file)
index 0000000..03f1d0f
Binary files /dev/null and b/portal/static/img/fibre/eu.png differ
diff --git a/portal/static/img/icon_authority_color.png~HEAD b/portal/static/img/icon_authority_color.png~HEAD
new file mode 100644 (file)
index 0000000..342a1dd
Binary files /dev/null and b/portal/static/img/icon_authority_color.png~HEAD differ
diff --git a/portal/static/img/icon_slices.png~HEAD b/portal/static/img/icon_slices.png~HEAD
new file mode 100644 (file)
index 0000000..9527461
Binary files /dev/null and b/portal/static/img/icon_slices.png~HEAD differ
diff --git a/portal/static/img/icon_support.png~HEAD b/portal/static/img/icon_support.png~HEAD
new file mode 100644 (file)
index 0000000..54bce1b
Binary files /dev/null and b/portal/static/img/icon_support.png~HEAD differ
diff --git a/portal/static/img/icon_testbed_color.png~HEAD b/portal/static/img/icon_testbed_color.png~HEAD
new file mode 100644 (file)
index 0000000..f3c55e4
Binary files /dev/null and b/portal/static/img/icon_testbed_color.png~HEAD differ
diff --git a/portal/static/img/icon_user_color.png~HEAD b/portal/static/img/icon_user_color.png~HEAD
new file mode 100644 (file)
index 0000000..e88d559
Binary files /dev/null and b/portal/static/img/icon_user_color.png~HEAD differ
diff --git a/portal/static/img/ict_logo-s.png b/portal/static/img/ict_logo-s.png
new file mode 100644 (file)
index 0000000..78183ee
Binary files /dev/null and b/portal/static/img/ict_logo-s.png differ
diff --git a/portal/static/img/institutions/fed4fire.iminds.gif b/portal/static/img/institutions/fed4fire.iminds.gif
new file mode 100644 (file)
index 0000000..5799ed9
Binary files /dev/null and b/portal/static/img/institutions/fed4fire.iminds.gif differ
diff --git a/portal/static/img/institutions/fed4fire.upmc.gif b/portal/static/img/institutions/fed4fire.upmc.gif
new file mode 100644 (file)
index 0000000..1a2d1cb
Binary files /dev/null and b/portal/static/img/institutions/fed4fire.upmc.gif differ
diff --git a/portal/static/img/nepi_logo.png b/portal/static/img/nepi_logo.png
new file mode 100644 (file)
index 0000000..ddef5d7
Binary files /dev/null and b/portal/static/img/nepi_logo.png differ
diff --git a/portal/static/img/omf-logo.png b/portal/static/img/omf-logo.png
new file mode 100644 (file)
index 0000000..000c980
Binary files /dev/null and b/portal/static/img/omf-logo.png differ
diff --git a/portal/static/img/terminal_icon.png b/portal/static/img/terminal_icon.png
new file mode 100644 (file)
index 0000000..95e7623
Binary files /dev/null and b/portal/static/img/terminal_icon.png differ
diff --git a/portal/templates/_widget-login-manager.html b/portal/templates/_widget-login-manager.html
new file mode 100644 (file)
index 0000000..7c5f170
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="well">
+       {% if state %}
+       <span class="help-block">{{ state }}</span>
+       {% endif %}
+       <form action="/login/" method="post" role="form">
+         {% csrf_token %}
+         {% if next %}
+         <input type="hidden" name="next" value="{{ next }}" />
+         {% endif %}
+       <div class="form-group">
+       <label for="username">Email address / Username</label>
+       <input type="email" class="form-control" name="username" placeholder="Enter Email / username">
+       </div>
+       <div class="form-group">
+       <label for="password">Password</label>
+       <input type="password" class="form-control" name="password" placeholder="Password">
+       </div>
+       <div class="login-submit">
+               <input class="btn btn-default" type="submit" value="Sign In" />
+               <span class="lost-password">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="/portal/pass_reset/">Can't access your account?</a></span>
+       </div>
+       <div class="login-signup">
+               <a href="/portal/register">Try</a>, <a href="/portal/register">Sign Up</a> or <a href="/portal/join">Join</a>
+       </div>
+       </form>
+</div>
diff --git a/portal/templates/_widget-login-user.html b/portal/templates/_widget-login-user.html
new file mode 100644 (file)
index 0000000..9e24887
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="well login-widget">
+       {% if state %}
+       <span class="help-block">{{ state }}</span>
+       {% endif %}
+       <form action="/login/" method="post" role="form">
+         {% csrf_token %}
+         {% if next %}
+         <input type="hidden" name="next" value="{{ next }}" />
+         {% endif %}
+       <div class="form-group">
+       <label for="username">Email address / Username</label>
+       <input type="email" class="form-control" name="username" placeholder="Enter Email / username">
+       </div>
+       <div class="form-group">
+       <label for="password">Password</label>
+       <input type="password" class="form-control" name="password" placeholder="Password">
+       </div>
+       <div class="login-submit">
+               <input class="btn btn-default" type="submit" value="Sign In" />
+               <span class="lost-password">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="/portal/pass_reset/">Can't access your account?</a></span>
+       </div>
+       <div class="login-signup">
+               <a href="/portal/register">Try</a> or <a href="/portal/register">Sign Up</a>
+       </div>
+       </form>
+</div>
diff --git a/portal/templates/_widget-news.html b/portal/templates/_widget-news.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/portal/templates/_widget-slice-sections.html b/portal/templates/_widget-slice-sections.html
new file mode 100644 (file)
index 0000000..bf64b8d
--- /dev/null
@@ -0,0 +1,33 @@
+{% if section == "resources" %}
+<ul class="nav nav-tabs nav-section">
+       <li><a href="/slice/{{ slice }}#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a></li>
+       <li><a href="/slice/{{ slice }}#testbeds">Testbeds</a></li>
+       <li class="active"><a class="link" href="/resources/{{ slice }}">Resources</a></li>
+       <li><a href="/slice/{{ slice }}#users">Users</a></li>
+       <li><a href="/slice/{{ slice }}#experiment">Statistics</a></li>
+       <li><a href="/slice/{{ slice }}#experiment">Measurements</a></li>
+       <li><a href="/slice/{{ slice }}#experiment" data-toggle="tab">Experiment</a></li>
+</ul>
+{% else %}
+<ul class="nav nav-tabs nav-section">
+       <li class="active"><a href="#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a></li>
+       <li class="testbeds"><a href="#testbeds">Testbeds</a></li>
+       <li><a class="link" href="/resources/{{ slice }}">Resources</a></li>
+       <li class="users"><a href="#users">Users</a></li>
+       <li class="statistics"><a href="#experiment">Statistics</a></li>
+       <li class="measurements"><a href="#experiment">Measurements</a></li>
+       <li class="experiment"><a href="#experiment" data-toggle="tab">Experiment</a></li>
+</ul>
+<script>
+$(document).ready(function() {
+       $('.nav-tabs a').click(function (e) {
+               if ($(this).hasClass('link')) return;
+               e.preventDefault();
+               $(this).tab('show');
+       var id = $(this).attr('href').substr(1);        
+       $("#" + id).load('/' + id + '/{{ slice }}/');
+       });
+       $('div#info').load('/info/{{ slice }}/');
+});
+</script>
+{% endif %}
\ No newline at end of file
diff --git a/portal/templates/_widget-topmenu.html b/portal/templates/_widget-topmenu.html
new file mode 100644 (file)
index 0000000..6236344
--- /dev/null
@@ -0,0 +1,71 @@
+
+<div id="header">
+       <div class="wrapper">
+               <div class="logo">
+                       <a href="/"><img src="{{ STATIC_URL }}img/onelab-portal.png" alt="OneLab - Future Internet Testbeds" /></a>
+               </div>
+               
+               <div id="secondary">
+                       <ul>
+                               <li><a href="/news">News</a></li>
+                               <li><a href="/portal/about">About</a></li>
+                               <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
+                               <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
+                       </ul>
+               </div>
+       </div>
+       
+       {% if username %}
+       <div id="navigation">
+               <div class="wrapper">
+               <ul>
+                       <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
+                       <li>|</li>
+                       <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
+                       <li class="slices">
+                               <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+                                       SLICES <span class="caret"></span>
+                       </a>
+                               
+                               <div class="dropdown-menu" style="z-index:99;">
+                                               <ul id="dropdown-slice-list">
+                                                       <li><a href="/portal/slice_request/">Request Slice</a></li>
+                                               </ul>
+                               </div>
+                               </li>
+                       <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
+                       <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
+                       <li>|</li>
+                       <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
+               </ul>
+               </div>
+       </div>
+       {% else %}
+       <div id="navigation">
+               <div class="wrapper"></div>
+       </div>
+       {% endif %}
+</div>
+<script>
+       $(document).ready(function() {
+               $('li.slices').mouseenter(function() {
+                       $('div#menu-slice-list').fadeIn(100);
+               });
+               $('div#menu-slice-list').mouseleave(function(e) {
+                       if (!$('li.slices').is(":hover")) {
+                               $(this).fadeOut(100);
+                       }
+               });
+               // var slices = localStorage.getItem('slices');
+               // if (slices.length == 0) {
+                       // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+                       // var items = [];
+                               // localStorage.setItem('slices', data[0].slice);
+                       // });
+               // }
+               // $.each(slices, function( key, val ) {
+                       // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+               // });
+               // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+       });
+</script>
diff --git a/portal/templates/base.html b/portal/templates/base.html
new file mode 100644 (file)
index 0000000..decd041
--- /dev/null
@@ -0,0 +1,82 @@
+{% load portal_filters %}
+{# This is required by insert_above #}{% insert_handler %}<!DOCTYPE html>
+<html lang="en"><head>
+<title>{{theme}} portal - {{ section }}</title>
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="shortcut icon" href="/static/img/favicon.ico">
+{# This is where insert_str will end up #}{% media_container prelude %}
+{% include 'messages-transient-header.html' %}
+<script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
+<script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+<script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
+<!-- <script src="{{ STATIC_URL }}js/stash.min.js"></script> -->
+<script src="{{ STATIC_URL }}js/myslice.js"></script>
+<script src="{{ STATIC_URL }}js/myslice-ui.js"></script>
+<style type="text/css">{# In case we need to add raw css code #}{% container prelude_css %}</style>
+{{ header_prelude }}
+{% block head %} {% endblock head %}
+{# let's add these ones no matter what #}
+{% insert_str prelude "js/jquery.min.js" %}
+{% insert_str prelude "js/jquery.html5storage.min.js" %}
+{% insert_str prelude "js/messages-runtime.js" %}
+{% insert_str prelude "js/class.js" %}
+{% insert_str prelude "js/plugin-helper.js" %}
+{% insert_str prelude "js/mustache.js" %}
+{% insert_str prelude "js/plugin.js" %}
+{% insert_str prelude "js/manifold.js" %}
+{% insert_str prelude "css/manifold.css" %}
+{% insert_str prelude "css/plugin.css" %}
+{% insert_str prelude "js/bootstrap.js" %}
+{% insert_str prelude "css/bootstrap.css" %}
+{% insert_str prelude "css/topmenu.css" %}
+{% insert_str prelude "js/logout.js" %}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
+
+<script type="text/javascript">
+/*
+XXX TODO: session
+This list of slices should go into SESSION !
+*/
+$(document).ready(function() {
+    {% if username %}
+    myslice.login();
+
+    user = myslice.user();
+    
+    var slices = [];
+    if($.isEmptyObject(user)){
+        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+            if(data.length > 0){
+                slices = data[0].slices;  
+            }else{
+                slices.push("no slice");
+            }
+            drawSlices(slices);
+       });
+    }else{
+        slices = user.slices;
+        drawSlices(slices);
+    }
+    function drawSlices(slices){
+        var items = [];
+        $.each( slices, function(i, val) {
+            items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
+        });
+        $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+        $("ul#dropdown-slice-list").append(items.join( "" ));
+    }
+    {% endif %}
+});
+</script>
+</head>
+<body>
+{% block container %}
+       {% block topmenu %}
+       {% widget "_widget-topmenu.html" %}
+       {% endblock topmenu %}
+       {% include 'messages-transient.html' %}
+       {% block base_content %}
+       {% endblock %}
+{% endblock container %}
+</body>
+</html>
diff --git a/portal/templates/fantaastic/fantaastic_widget-topmenu.html b/portal/templates/fantaastic/fantaastic_widget-topmenu.html
new file mode 100644 (file)
index 0000000..de37b04
--- /dev/null
@@ -0,0 +1,76 @@
+
+<div id="header">
+       <div class="wrapper">
+               <div class="logo">
+                       <a href="/"><img src="{{ STATIC_URL }}img/fantaastic-s.png" alt="FanTaaStic" /></a>
+               </div>
+               
+               <div id="secondary">
+                       <ul>
+                               <li>News</li>
+                               <li><a href="/portal/about">About</a></li>
+                               <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
+                               <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
+                       </ul>
+               </div>
+       </div>
+       
+       {% if username %}
+       <div id="navigation">
+               <div class="wrapper">
+               <ul>
+                       <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
+                       <li>|</li>
+                       <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
+                       <li class="slices">
+                               <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+                                       SLICES <span class="caret"></span>
+                       </a>
+                               
+                               <div class="dropdown-menu" style="z-index:99;">
+                                               <ul>
+                                                       <li><a href="/portal/slice_request/">Request Slice</a></li>
+                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
+                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
+                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
+                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
+                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
+                                               </ul>
+                               </div>
+                               </li>
+                       <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
+                       <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
+                       <li>|</li>
+                       <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
+               </ul>
+               </div>
+       </div>
+       {% else %}
+       <div id="navigation">
+               <div class="wrapper"></div>
+       </div>
+       {% endif %}
+</div>
+<script>
+       $(document).ready(function() {
+               $('li.slices').mouseenter(function() {
+                       $('div#menu-slice-list').fadeIn(100);
+               });
+               $('div#menu-slice-list').mouseleave(function(e) {
+                       if (!$('li.slices').is(":hover")) {
+                               $(this).fadeOut(100);
+                       }
+               });
+               // var slices = localStorage.getItem('slices');
+               // if (slices.length == 0) {
+                       // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+                       // var items = [];
+                               // localStorage.setItem('slices', data[0].slice);
+                       // });
+               // }
+               // $.each(slices, function( key, val ) {
+                       // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+               // });
+               // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+       });
+</script>
diff --git a/portal/templates/fed4fire/fed4fire_base.html b/portal/templates/fed4fire/fed4fire_base.html
new file mode 100644 (file)
index 0000000..f411ec2
--- /dev/null
@@ -0,0 +1,43 @@
+{# This is required by insert_above #}{% insert_handler %}<!DOCTYPE html>
+<html lang="en"><head>
+<title>Fed4Fire Portal - {{ section }}</title>
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="shortcut icon" href="/static/img/myslice-icon.png">
+{# This is where insert_str will end up #}{% media_container prelude %}
+{% include 'messages-transient-header.html' %}
+<script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
+<script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+<script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
+<script src="{{ STATIC_URL }}js/myslice.js"></script>
+<script src="{{ STATIC_URL }}js/myslice-ui.js"></script>
+<style type="text/css">{# In case we need to add raw css code #}{% container prelude_css %}</style>
+{{ header_prelude }}
+{% block head %} {% endblock head %}
+{# let's add these ones no matter what #}
+{% insert_str prelude "js/jquery.min.js" %}
+{% insert_str prelude "js/jquery.html5storage.min.js" %}
+{% insert_str prelude "js/messages-runtime.js" %}
+{% insert_str prelude "js/class.js" %}
+{% insert_str prelude "js/plugin-helper.js" %}
+{% insert_str prelude "js/mustache.js" %}
+{% insert_str prelude "js/plugin.js" %}
+{% insert_str prelude "js/manifold.js" %}
+{% insert_str prelude "css/manifold.css" %}
+{% insert_str prelude "css/plugin.css" %}
+{% insert_str prelude "js/bootstrap.js" %}
+{% insert_str prelude "css/bootstrap.css" %}
+{% insert_str prelude "css/topmenu.css" %}
+{% insert_str prelude "js/logout.js" %}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
+</head>
+<body>
+{% block container %}
+       {% block topmenu %}
+       {% include theme|add:"__widget-topmenu.html" %}
+       {% endblock topmenu %}
+       {% include 'messages-transient.html' %}
+       {% block base_content %}
+       {% endblock %}
+{% endblock container %}
+</body>
+</html>
diff --git a/portal/templates/fed4fire/fed4fire_contact.html b/portal/templates/fed4fire/fed4fire_contact.html
new file mode 100644 (file)
index 0000000..600eb4a
--- /dev/null
@@ -0,0 +1,38 @@
+{% extends "layout.html" %}
+
+{% block head %}
+{{ wizard.form.media }}
+{% endblock %}
+
+{% block content %}
+<div class="row">
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}icons/support-xs.png" alt="Open a Ticket" /> Fed4Fire Support</h1>
+       </div>
+</div>
+<div class="row">
+       <div class="col-md-12">&nbsp;</div>
+</div>
+<div class="row">
+       <div class="col-md-12">
+       <p>Please check the <a href="http://doc.fed4fire.eu/support.html" target="_blank">documentation</a></p>
+       </div>
+</div>
+
+<div class="row">
+       <div class="col-md-2"></div>
+       <div class="col-md-8">
+               <form role="form" method="post">
+               {% csrf_token %}
+               {% for field in form %}
+           <div class="form-group">
+               <label for="{{ field.html_name }}" class="control-label">{{ field.label }}</label>
+               {{ field.errors }} {{ field }}
+           </div>
+           {% endfor %}
+               <button type="submit" class="btn btn-default">Create Ticket</button>
+               </form>
+       </div>
+</div>
+{% endblock %}
+
diff --git a/portal/templates/fed4fire/fed4fire_supportview.html b/portal/templates/fed4fire/fed4fire_supportview.html
new file mode 100644 (file)
index 0000000..2f6e183
--- /dev/null
@@ -0,0 +1,46 @@
+{% extends "layout.html" %}
+
+{% block content %}
+       <div class="row">
+               <h1><img src="{{ STATIC_URL }}icons/support-xs.png" alt="Support" /> Fed4Fire Portal Support</h1>
+       </div>
+
+       
+       <div class="row">
+               <h2>Report a Bug</h2>
+               <p>If you have found a bug or having difficulties accesing some features or found some anomalies, please report it using our ticketing system.</p>
+               <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
+       </div>
+       
+       <div class="row">
+       
+               <h2><a href="/portal/support/documentation">FAQ</a></h2>
+               <h2>Contact Us</h2>
+               
+               <h3>Mailing List</h3>
+               <p>You can subscribe to our mailing list by sending a request to: <b>support</b> AT <b>myslice</b> DOT <b>info</b></p>
+               <p>Also you can adress any issues in the same email address.</p>
+               
+               <h3>Mailing Address</h3>
+               <p>
+               UPMC - LIP6<br> 
+               Boîte courrier 16 <br>
+               Couloir 26-00, Etage 01, Bureau 102<br>
+               4 place Jussieu<br>
+               75252 PARIS CEDEX 05<br>
+               France<br> 
+               </p>
+       </div>
+
+<script>
+    $(document).ready(function() {
+               $('li#nav-support').addClass("active");
+        $('button#ticketbtn').click(function() {
+            window.location="/portal/contact/";
+        });
+    });
+</script>
+
+
+{% endblock %}
+
diff --git a/portal/templates/fed4fire/fed4fire_widget-slice-sections.html b/portal/templates/fed4fire/fed4fire_widget-slice-sections.html
new file mode 100644 (file)
index 0000000..bf64b8d
--- /dev/null
@@ -0,0 +1,33 @@
+{% if section == "resources" %}
+<ul class="nav nav-tabs nav-section">
+       <li><a href="/slice/{{ slice }}#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a></li>
+       <li><a href="/slice/{{ slice }}#testbeds">Testbeds</a></li>
+       <li class="active"><a class="link" href="/resources/{{ slice }}">Resources</a></li>
+       <li><a href="/slice/{{ slice }}#users">Users</a></li>
+       <li><a href="/slice/{{ slice }}#experiment">Statistics</a></li>
+       <li><a href="/slice/{{ slice }}#experiment">Measurements</a></li>
+       <li><a href="/slice/{{ slice }}#experiment" data-toggle="tab">Experiment</a></li>
+</ul>
+{% else %}
+<ul class="nav nav-tabs nav-section">
+       <li class="active"><a href="#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a></li>
+       <li class="testbeds"><a href="#testbeds">Testbeds</a></li>
+       <li><a class="link" href="/resources/{{ slice }}">Resources</a></li>
+       <li class="users"><a href="#users">Users</a></li>
+       <li class="statistics"><a href="#experiment">Statistics</a></li>
+       <li class="measurements"><a href="#experiment">Measurements</a></li>
+       <li class="experiment"><a href="#experiment" data-toggle="tab">Experiment</a></li>
+</ul>
+<script>
+$(document).ready(function() {
+       $('.nav-tabs a').click(function (e) {
+               if ($(this).hasClass('link')) return;
+               e.preventDefault();
+               $(this).tab('show');
+       var id = $(this).attr('href').substr(1);        
+       $("#" + id).load('/' + id + '/{{ slice }}/');
+       });
+       $('div#info').load('/info/{{ slice }}/');
+});
+</script>
+{% endif %}
\ No newline at end of file
diff --git a/portal/templates/fed4fire/fed4fire_widget-topmenu.html b/portal/templates/fed4fire/fed4fire_widget-topmenu.html
new file mode 100644 (file)
index 0000000..74edfdc
--- /dev/null
@@ -0,0 +1,77 @@
+
+<div id="header">
+       <div class="wrapper">
+               <div class="logo">
+                       <a href="/"><img src="{{ STATIC_URL }}img/f4f-logo.png" alt="Fed4Fire Portal" width="80px" />Fed4Fire Portal</a>
+               </div>
+               
+               <div id="secondary">
+                       <ul>
+                               <li>News</li>
+                               <li><a href="/portal/about">About</a></li>
+                               <li><a target="_blank" href="http://www.fed4fire.eu">Project Website</a></li>
+                       </ul>
+               </div>
+       </div>
+       
+       {% if username %}
+       <div id="navigation">
+               <div class="wrapper">
+               <ul>
+                       <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
+                       <li>|</li>
+                       <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
+                       <li class="slices">
+                               <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+                                       SLICES <span class="caret"></span>
+                       </a>
+                               
+                               <div class="dropdown-menu" style="z-index:99;">
+                                               <ul id="dropdown-slice-list">
+                                                       <li><a href="/portal/slice_request/">Request Slice</a></li>
+                            <!--
+                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
+                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
+                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
+                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
+                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
+                            -->
+                                               </ul>
+                               </div>
+                               </li>
+                       <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
+                       <li id="nav-support"><a href="http://doc.fed4fire.eu/support.html" target="_blank">SUPPORT</a></li>
+                       <li>|</li>
+                       <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
+               </ul>
+               </div>
+       </div>
+       {% else %}
+       <div id="navigation">
+               <div class="wrapper"></div>
+       </div>
+       {% endif %}
+</div>
+<script>
+       $(document).ready(function() {
+               $('li.slices').mouseenter(function() {
+                       $('div#menu-slice-list').fadeIn(100);
+               });
+               $('div#menu-slice-list').mouseleave(function(e) {
+                       if (!$('li.slices').is(":hover")) {
+                               $(this).fadeOut(100);
+                       }
+               });
+               // var slices = localStorage.getItem('slices');
+               // if (slices.length == 0) {
+                       // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+                       // var items = [];
+                               // localStorage.setItem('slices', data[0].slice);
+                       // });
+               // }
+               // $.each(slices, function( key, val ) {
+                       // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+               // });
+               // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+       });
+</script>
diff --git a/portal/templates/fibre/.fibre__widget-login-fed-manager.html.swp b/portal/templates/fibre/.fibre__widget-login-fed-manager.html.swp
new file mode 100644 (file)
index 0000000..bdd90af
Binary files /dev/null and b/portal/templates/fibre/.fibre__widget-login-fed-manager.html.swp differ
diff --git a/portal/templates/fibre/fibre__widget-login-fed-manager.html b/portal/templates/fibre/fibre__widget-login-fed-manager.html
new file mode 100644 (file)
index 0000000..5754b35
--- /dev/null
@@ -0,0 +1,34 @@
+<div class="well">
+       {% if state %}
+       <span class="help-block">{{ state }}</span>
+       {% endif %}
+       <form action="/login/" method="post" role="form">
+         {% csrf_token %}
+         {% if next %}
+         <input type="hidden" name="next" value="{{ next }}" />
+         {% endif %}
+       <div class="form-group">
+       <label for="fed"></label>
+       <input type="radio" name="br" checked>
+               <img src="{{ STATIC_URL }}img/fibre/br.png" alt="Brazil" height="32" width="40" />
+       <input type="radio" name="eu">
+               <img src="{{ STATIC_URL }}img/fibre/eu.png" alt="Europe Union" height="32" width="32" />
+       <input type="radio" name="local">Local User
+       </div>
+       <div class="form-group">
+       <label for="username">Username </label>
+       <input type="email" class="form-control" name="username" placeholder="Enter Email / username">
+       </div>
+       <div class="form-group">
+       <label for="password">Password</label>
+       <input type="password" class="form-control" name="password" placeholder="Password">
+       </div>
+       <div class="login-submit">
+               <input class="btn btn-default" type="submit" value="Sign In" />
+               <span class="lost-password">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="/portal/pass_reset/">Can't access your account?</a></span>
+       </div>
+       <div class="login-signup">
+               <a href="/portal/register">Try</a>, <a href="/portal/register">Sign Up</a> or <a href="/portal/join">Join</a>
+       </div>
+       </form>
+</div>
diff --git a/portal/templates/fibre/fibre_about.html b/portal/templates/fibre/fibre_about.html
new file mode 100644 (file)
index 0000000..66c0b97
--- /dev/null
@@ -0,0 +1,41 @@
+{% extends "layout.html" %}
+
+{% block content %}
+<div class="row">
+       <h1><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> About</h1>
+</div>
+
+<div class="row">
+       <h3>A ready-made and easily customisable user interface for your testbed.</h3>
+
+       <p>
+               MySlice is an ambitious project aiming to support researchers throughout the lifecycle of experiments that can run on a variety 
+               of testbeds spanning different administrative domains and networking technologies. Its basic principle is to bring together 
+               available resources with useful information (characteristics, performance, network measurements).
+       </p>
+       <p>
+       MySlice inititiave started in Janury 2011 by offering annotation services for the first ederated experimental resources. Today, 
+       MySlice has taken a big step toward becoming a tand-alone web framework, which will present all available resources from testbeds 
+       across the world, interconnected through the Slice-based Facility Architecture (SFA) and annotated by the TopHat measurement system.
+       </p>
+       <p>
+       Our framework is built with standard programming tools (php and javascript for the front-end and python for the back-end) 
+       and has a modular structure based on the concept of plugins for implementing different core functionalities (query editing, 
+       data display, and resource allocation).
+       </p>
+       <p>
+       The goal is to enable developers with expertise on different testbed technologies and different experimental 
+       practices to work in parallel for optimizing the tools presented to the users allowing them for a wide range of choices 
+       according to their own requirements. Opening in this way the development of web-based user tools for experimentation and 
+       sharing effort and information can increase significantly the chances for the achievement of our challenging objective.
+       </p>
+       <p>
+       You can access the code at git.myslice.info. If you need write access to the git repository you need first to send
+        your public key to <a href="mailto:support@myslice.info">support@myslice.info</a>. 
+       </p>
+       <p>
+               Go to the <a href ="http://myslice.info">MySlice web site</a> or the <a href ="http://www.fibre-ict.eu">FIBRE public web site</a>
+       </p>
+</div>
+
+{% endblock %}
diff --git a/portal/templates/fibre/fibre_institution.html b/portal/templates/fibre/fibre_institution.html
new file mode 100644 (file)
index 0000000..82cb36e
--- /dev/null
@@ -0,0 +1,191 @@
+{% extends "layout.html" %}
+{% block head %} 
+<script type="text/javascript" src="{{STATIC_URL}}/js/institution.js"></script>
+{% endblock head %}
+{% block content %}
+<div class="row">
+       <h1><img src="{{ STATIC_URL }}img/icon_authority_color_small.png" alt="" /> Institution: {{user_details.parent_authority}}</h1>
+</div>
+<div class="row" id="institution">
+    <ul class="nav nav-tabs">
+      <li class="active" id="authority-tab"><a class="home-tab" data-panel="institution" href="#">INFO</a></li>
+      <li id="users-tab"><a class="home-tab" data-panel="users" href="#">USERS</a></li>
+      <li id="slices-tab"><a class="home-tab" data-panel="slices" href="#">SLICES</a></li>
+    </ul>
+    <div class="home-panel" id="institution">
+        <div id="authority-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Authority" /></div>
+        <div id="authority-tab-loaded" style="display:none;">
+            <div id="authority-data" style="float:left; width:50%;"></div>
+        </div>
+    </div>
+    <div class="home-panel" id="users" style="display:none;">
+        <div id="user-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
+        <div id="user-tab-loaded" style="display:none;">
+            <table id="user-tab">
+                <tr>
+                    <th>+/-</th>
+                    <th>Email</th>
+                    <th>user_hrn</th>
+                    <th>First name</th>
+                    <th>Last name</th>
+                    <th>Enabled</th>
+                </tr>
+            </table>
+            <br>
+            <button id="deleteusers" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Users</button>
+        </div>
+       </div>
+    <div class="home-panel" id="slices" style="display:none;">
+        <button id="createslice" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> create slice</button>
+        <div id="slice-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
+        <div id="slice-tab-loaded" style="display:none;">
+            <table id="slice-tab">
+                <tr>
+                    <th>+/-</th>
+                    <th>slice_hrn</th>
+                    <th>users</th>
+                    <th>url</th>
+                    <th>nodes</th>
+                    <th>expiration</th>
+                </tr>
+            </table>
+            <br>
+            <div>
+                <button id="renewslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Renew Slices</button>
+                <button id="deleteslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Slices</button>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    $(document).ready(function() {
+        {% if person %}
+        {% if user_details.parent_authority %}
+        $.post("/rest/authority/",{'filters':{'authority_hrn':'{{user_details.parent_authority}}'}}, function( data ) {
+            var authority_data = [];
+            var onelab_data = [];
+                       /* 'city','enabled','legal','longitude','onelab_membership','address','parent_authority','slice','user','country',
+            'tech','abbreviated_name','url','postcode','description','scientific','authority_hrn','latitude','name'    */
+            $.each( data, function( key, val ) {
+                authority_row = "<img src='{{ STATIC_URL }}img/institutions/{{user_details.parent_authority}}.gif' alt='' /><br>";
+                authority_row += "<br>";
+                authority_row += "<b>authority:</b> "+val.authority_hrn+"<br>";
+                authority_row += "<br>";
+                /*
+                authority_row += "<b>"+val.name+"</b><br>";
+                authority_row += "<br>";
+                authority_row += "<b>Address:</b> "+val.address+"<br>";
+                authority_row += "<b>City:</b> "+val.postcode+" "+val.city+"<br>";
+                authority_row += "<br>";
+                authority_row += "<b>Country:</b> "+val.country+"<br>";
+                authority_row += "<br>";
+                authority_row += "<br>";
+                authority_row += "<h2>Contacts</h2>";
+                authority_row += "<b>Legal:</b> ";
+                */
+                /*
+
+                TODO: find a way to express JSON correctly given the constrains: CSV / JSON
+
+                legal = jQuery.parseJSON(val.legal);
+                if($.isArray(legal)){
+                    $.each(legal, function(k,v){
+                        authority_row += k+" "+v+"<br>";
+                    });
+                }else{
+                    authority_row += val.legal+"<br>";
+                //}
+                authority_row += "<br>";
+                authority_row += "<b>Scientific:</b> ";
+                scientific = jQuery.parseJSON(val.scientific);
+                if($.isArray(scientific)){
+                    $.each(scientific, function(v){
+                        authority_row += v+", ";
+                    });
+                }else{
+                
+                    authority_row += val.scientific+"<br>";
+                }
+                onelab_membership = "<b>Status: </b>"+val.onelab_membership;
+                onelab_data.push(onelab_membership);
+                */
+                authority_data.push(authority_row);
+            });
+            $("div#authority-data").html(authority_data.join( "" ));
+            $("div#onelab-data").html(onelab_data.join( "" ));
+            $("div#authority-tab-loaded").css("display","block");
+            $("div#authority-tab-loading").css("display","none");
+         });
+
+        $.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+            var list_slices = [];
+            var table_slices = [];
+            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */
+            $.each( data, function( key, val ) {
+                list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+                if(val.nodes=="undefined" || val.nodes==null){
+                    nodes_length=0;
+                }else{
+                    nodes_length=val.nodes.length;
+                }
+
+                if(val.user=="undefined" || val.user==null){
+                    user_length=0;
+                }else{
+                    user_length=val.user.length;
+                }
+
+                if(val.slice_url=="undefined" || val.slice_url==null){
+                    slice_url="";
+                }else{
+                    slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
+                }
+                
+                slice_row = "<tr id='"+val.slice_hrn+"'>";
+                slice_row += "<td><input type='checkbox' class='slice' id='"+val.slice_hrn+"'></td>";
+                slice_row += "<td><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
+                slice_row += "<td>"+user_length+"</td>";
+                slice_row += "<td>"+slice_url+"</td>";
+                slice_row += "<td>"+nodes_length+"</td>";
+                slice_row += "<td>"+val.slice_expires+"</td>";
+                slice_row += "</tr>";
+                table_slices.push(slice_row);
+                
+            });
+           
+            /* $("div#slice-list").html($( "<ul/>", { html: list_slices.join( "" ) })); */
+            $("table#slice-tab tr:last").after(table_slices.join( "" ));
+            $("div#slice-tab-loaded").css("display","block");
+            $("div#slice-tab-loading").css("display","none");
+        });
+
+        $.post("/rest/user/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+            var list_users = [];
+            var table_users = [];
+                       /* Available fields
+                       user_gid, user_enabled, slices, pi_authorities, keys, parent_authority, user_first_name,
+                       user_urn, user_last_name, user_phone, user_hrn, user_email, user_type
+                       */
+            $.each( data, function( key, val ) {
+                list_users.push( "<li><a href=\"portal/user/"+val.user_email+"\">" + val.user_email + "</a></li>" );
+
+                user_row = "<tr id='"+val.user_hrn+"'>";
+                user_row += "<td><input type='checkbox' class='user' id='"+val.user_hrn+"'></td>";
+                user_row += "<td>"+val.user_email+"</td>";
+                user_row += "<td>"+val.user_hrn+"</td>";
+                user_row += "<td>"+val.user_first_name+"</td>";
+                user_row += "<td>"+val.user_last_name+"</td>";
+                               user_row += "<td>"+val.user_enabled+"</td>";
+                user_row += "</tr>";
+                table_users.push(user_row);
+                
+            });
+            $("table#user-tab tr:last").after(table_users.join( "" ));
+            $("div#user-tab-loaded").css("display","block");
+            $("div#user-tab-loading").css("display","none");
+         });
+         {% endif %}
+         {% endif %}
+    });
+</script>
+{% endblock %}
diff --git a/portal/templates/fibre/fibre_slice-request-ack-view.html b/portal/templates/fibre/fibre_slice-request-ack-view.html
new file mode 100644 (file)
index 0000000..c101b06
--- /dev/null
@@ -0,0 +1,9 @@
+{% extends "layout.html" %}
+
+{% block content %}
+
+  <h1>Slice request Received !</h1>
+
+We will process your request and get back to you as soon as possible.
+{% endblock %}
+
diff --git a/portal/templates/fibre/fibre_slice-request-done-view.html b/portal/templates/fibre/fibre_slice-request-done-view.html
new file mode 100644 (file)
index 0000000..f3293ad
--- /dev/null
@@ -0,0 +1,10 @@
+{% extends "layout-unfold1.html" %}
+
+{% block unfold_main %}
+
+  <h1>Slice created !</h1>
+
+As you are a PI of the site, you slice has directly been created.
+
+{% endblock %}
+
diff --git a/portal/templates/fibre/fibre_supportview.html b/portal/templates/fibre/fibre_supportview.html
new file mode 100644 (file)
index 0000000..373a652
--- /dev/null
@@ -0,0 +1,64 @@
+{% extends "layout.html" %}
+
+{% block content %}
+       <div class="row">
+               <h1><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="Request a Slice" /> Portal Support</h1>
+       </div>
+
+       
+       <div class="row">
+               <h2>Report a Bug</h2>
+               <p>If you have found a bug or having difficulties accesing some features or found some anomalies, please report it using our ticketing system.</p>
+               <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
+               <h3>Unresolved Tickets</h3>
+       </div>
+
+       <div class="row">
+           <table class="mytable table table-bordered table-hover">
+               <tr>
+                   <th>Ticket No</th>
+                               <th>Reported By</th>
+                               <th>Description</th>
+                   <th>Status</th>
+               </tr>
+               <tr>
+                   <td>1</td>
+                               <td>yasin.upmc@gmail.com</td>
+                               <td> Slice_request page is not working </td>
+                               <td> Unresolved</td>
+               </tr>
+                       <tr>
+                               <td>2</td>
+                               <td>azerty@lip6.fr</td>
+                               <td>Unable to Register</td>
+                               <td>Unresolved</td>
+                       </tr>
+       
+           </table>
+       </div>
+
+
+       
+       <div class="row">
+       
+               <h2><a href="/portal/support/documentation">FAQ</a></h2>
+               <h2>Contact Us</h2>
+               
+               <h3>Mailing List</h3>
+               <p>You can subscribe to our mailing list by sending a request to: <b>support</b> AT <b>myslice</b> DOT <b>info</b></p>
+               <p>Also you can adress any issues in the same email address.</p>
+               
+       </div>
+
+<script>
+    $(document).ready(function() {
+               $('li#nav-support').addClass("active");
+        $('button#ticketbtn').click(function() {
+            window.location="/portal/contact/";
+        });
+    });
+</script>
+
+
+{% endblock %}
+
diff --git a/portal/templates/fibre/fibre_user_register_complete.html b/portal/templates/fibre/fibre_user_register_complete.html
new file mode 100644 (file)
index 0000000..5b99d24
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends "layout.html" %}
+
+{% block content %}
+
+<div class="row">
+       <h1><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="User Registration" /> Experimenter Registration</h1>
+</div>
+<div class="row">
+  <h3>User registration complete !</h3>
+  <p>
+       You will receive an email with further instructions.
+  </p>
+ </div>
+
+{% endblock %}
diff --git a/portal/templates/fibre/old/fibre_slice-resource-view.html b/portal/templates/fibre/old/fibre_slice-resource-view.html
new file mode 100644 (file)
index 0000000..a2971d1
--- /dev/null
@@ -0,0 +1,45 @@
+{% extends "layout_wide.html" %}
+
+{% block head %}
+<script src="{{ STATIC_URL }}js/onelab_slice-resource-view.js"></script>
+{% endblock %}
+
+{% block content %}
+       <div class="col-md-2">
+               <div id="select-platform" class="list-group">
+               </div>
+                       
+               <ul class="list-group">
+                 <li class="list-group-item">Filter: CPU</li>
+                 <li class="list-group-item">Filter: Interface</li>
+                 <li class="list-group-item">...</li>
+                 <li class="list-group-item">...</li>
+                 <li class="list-group-item">...</li>
+               </ul>
+       
+       </div>
+       <div class="col-md-10">
+               <div class="row">
+                       {% include theme|add:"_widget-slice-sections.html" %}
+               </div>
+               <div class="row slice-pending">
+                       <ul class="nav nav-pills">
+                               <li><a href="">Unreserved</a></li>
+                               <li><a href="">Reserved</a></li>
+                               <li><a href="">Pending<span class="badge">42</span></a></li>
+                               <li>
+                                       <button type="button" class="btn btn-primary apply">Apply</button>
+                                       <button type="button" class="btn btn-default clear">Clear</button>
+                               </li>
+                       </ul>
+               </div>
+               <div class="row">
+                       <ul class="nav nav-tabs">
+                         <li class="active"><a href="#">Resources</a></li>
+                         <li><a href="#"></a></li>
+                         <li><a href="#"></a></li>
+                       </ul>
+               </div>
+               <table cellpadding="0" cellspacing="0" border="0" class="table" id="objectList"></table>
+       </div>
+{% endblock %}
\ No newline at end of file
diff --git a/portal/templates/fibre/old/fibre_slice-user-view.html b/portal/templates/fibre/old/fibre_slice-user-view.html
new file mode 100644 (file)
index 0000000..02bad23
--- /dev/null
@@ -0,0 +1,95 @@
+{% extends "layout_wide.html" %}
+
+
+{% block content %}
+       <div class="col-md-2">
+               <div id="select-platform" class="list-group">
+               </div>
+                       
+               <ul class="list-group">
+                 <li class="list-group-item">Filter: authority</li>
+                 <li class="list-group-item">Filter: slice</li>
+                 <li class="list-group-item">...</li>
+                 <li class="list-group-item">...</li>
+                 <li class="list-group-item">...</li>
+               </ul>
+       
+       </div>
+       <div class="col-md-10">
+               <div class="row">
+                       {% include theme|add:"_widget-slice-sections.html" %}
+               </div>
+               <div class="row slice-pending">
+                       <ul class="nav nav-pills">
+                               <li><a href="">All users</a></li>
+                               <li><a href="">Users in Slice</a></li>
+                               <li><a href="">Pending<span class="badge">42</span></a></li>
+                               <li>
+                                       <button type="button" class="btn btn-primary apply">Apply</button>
+                                       <button type="button" class="btn btn-default clear">Clear</button>
+                               </li>
+                       </ul>
+               </div>
+               <div class="row">
+                       <ul class="nav nav-tabs">
+                         <li class="active"><a href="#">Users</a></li>
+                         <li><a href="#"></a></li>
+                         <li><a href="#"></a></li>
+                       </ul>
+               </div>
+               <div id="user-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Useres" /></div>
+               <div id="user-tab-loaded" style="display:none;">
+               <table id="user-tab">
+                       <tr>
+                       <th>+/-</th>
+                       <th>Email</th>
+                       <th>user_hrn</th>
+                       <th>Enabled</th>
+                       </tr>
+               </table>
+               </div>
+<script>
+    $(document).ready(function() {
+        $.post("/rest/user/",{'filters':{'parent_authority':'ple.upmc'}}, function( data ) {
+            var list_users = [];
+            var table_users = [];
+                       /*
+                       "enabled", "keys", "parent_authority", "user_first_name", "user_last_name", "user_phone", "user_hrn", "slice", "user_email"
+                       */
+            $.each( data, function( key, val ) {
+                list_users.push( "<li><a href=\"portal/user/"+val.user_email+"\">" + val.user_email + "</a></li>" );
+                user_row = "<tr>";
+                               // checking the box for the users that belong to the selected slice
+                               var flag_checkbox = 0;
+                               for(var data in val.slice) {
+                               var element = val.slice[data];
+                                       console.log("element");
+                                       console.log(element);
+                                       for(var key in element) {
+                                       var value = element[key];
+                                               if (value == 'ple.upmc.myslicedemo'){
+                                               console.log("found!!");
+                                                       flag_checkbox = 1;
+                                                       user_row += "<td><input type='checkbox' checked='True'></td>";
+                                               }
+
+                                       }
+                               }
+                               if(flag_checkbox != 1){
+                       user_row += "<td><input type='checkbox'></td>";
+                               }
+                user_row += "<td>"+val.user_email+"</td>";
+                user_row += "<td>"+val.user_hrn+"</td>";
+                               user_row += "<td>"+val.enabled+"</td>";
+                user_row += "</tr>";
+                table_users.push(user_row);
+                
+            });
+                       $("table#user-tab tr:last").after(table_users.join( "" ));
+            $("div#user-tab-loaded").css("display","block");
+            $("div#user-tab-loading").css("display","none");
+         });
+    });
+</script>
+
+{% endblock %}
diff --git a/portal/templates/fibre/old/fibre_slice-view.html b/portal/templates/fibre/old/fibre_slice-view.html
new file mode 100644 (file)
index 0000000..a67d34b
--- /dev/null
@@ -0,0 +1,61 @@
+{% extends "layout_wide.html" %}
+
+{% block content %}
+       <div class="col-md-2"></div>
+       <div class="col-md-10">
+               <div class="row">
+                       {% include theme|add:"_widget-slice-sections.html" %}
+               </div>
+    </div>
+    
+       <div class="col-md-2"></div>
+       <div class="col-md-10">
+        <br>
+        <br>
+        <div id="slice-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
+        <div id="slice-tab-loaded" style="display:none;">
+            <table id="slice-tab">
+            </table>
+        </div>
+       </div>
+<script>
+    $(document).ready(function() {
+        $.post("/rest/slice/",{'filters':{'slice_hrn':'{{slice}}'}}, function( data ) {
+            var table_slices = [];
+            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */
+            $.each( data, function( key, val ) {
+                if(val.nodes=="undefined" || val.nodes==null){
+                    nodes_length=0;
+                }else{
+                    nodes_length=val.nodes.length;
+                }
+
+                if(val.user=="undefined" || val.user==null){
+                    user_length=0;
+                }else{
+                    user_length=val.user.length;
+                }
+
+                if(val.slice_url=="undefined" || val.slice_url==null){
+                    slice_url="";
+                }else{
+                    slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
+                }
+                
+                slice_row = "<tr><td><b>Description:</b></td><td>"+val.slice_description+"</td></tr>";
+                slice_row += "<tr><td><b>url:</b></td><td><a href='"+val.slice_url+" target='_blank'>"+val.slice_url+"</a></td></tr>";
+                slice_row += "<tr><td><b>users:</b></td><td>"+user_length+"</td></tr>";
+                slice_row += "<tr><td><b>resources:</b></td><td>"+nodes_length+"</td></tr>";
+                slice_row += "<tr><td><b>created:</b></td><td>"+val.created+"</td></tr>";
+                slice_row += "<tr><td><b>last update:</b></td><td>"+val.last_updated+"</td></tr>";
+                slice_row += "<tr><td><b>expires:</b></td><td>"+val.slice_expires+"</td></tr>";
+                table_slices.push(slice_row);
+            });
+           $("table#slice-tab").html(table_slices.join( "" ));
+           $("div#slice-tab-loaded").css("display","block");
+           $("div#slice-tab-loading").css("display","none");
+        });
+    });
+</script>
+{% endblock %}
diff --git a/portal/templates/fibre/old/fibre_widget-slice-sections.html b/portal/templates/fibre/old/fibre_widget-slice-sections.html
new file mode 100644 (file)
index 0000000..e637b15
--- /dev/null
@@ -0,0 +1,13 @@
+<div class="col-md-8 slice-sections">
+       <ul class="nav nav-pills nav-justified">
+               <li {% if section == 'slice' %}class="active"{% endif %}><a href="/slice/{{ slice }}/">{{ slice }}</a></li>
+               <li {% if section == 'testbeds' %}class="active"{% endif %}><a href="/testbeds/{{ slice }}/">Testbeds</a></li>
+               <li {% if section == 'resources' %}class="active"{% endif %}><a href="/resources/{{ slice }}/">Resources</a></li>
+               <li {% if section == 'users' %}class="active"{% endif %}><a href="/users/{{ slice }}/">Users</a></li>
+               <li><a href="">Statistics</a></li>
+               <li><a href="">Measurements</a></li>
+       </ul>
+</div>
+<div class="col-md-4 slice-experiment">
+       <a href="/portal/experiment"><button type="button" class="btn btn-default">Experiment</button></a>
+</div>
diff --git a/portal/templates/fibre/onelab__widget-login-manager.html b/portal/templates/fibre/onelab__widget-login-manager.html
new file mode 100644 (file)
index 0000000..7c5f170
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="well">
+       {% if state %}
+       <span class="help-block">{{ state }}</span>
+       {% endif %}
+       <form action="/login/" method="post" role="form">
+         {% csrf_token %}
+         {% if next %}
+         <input type="hidden" name="next" value="{{ next }}" />
+         {% endif %}
+       <div class="form-group">
+       <label for="username">Email address / Username</label>
+       <input type="email" class="form-control" name="username" placeholder="Enter Email / username">
+       </div>
+       <div class="form-group">
+       <label for="password">Password</label>
+       <input type="password" class="form-control" name="password" placeholder="Password">
+       </div>
+       <div class="login-submit">
+               <input class="btn btn-default" type="submit" value="Sign In" />
+               <span class="lost-password">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="/portal/pass_reset/">Can't access your account?</a></span>
+       </div>
+       <div class="login-signup">
+               <a href="/portal/register">Try</a>, <a href="/portal/register">Sign Up</a> or <a href="/portal/join">Join</a>
+       </div>
+       </form>
+</div>
diff --git a/portal/templates/fibre/onelab__widget-login-user.html b/portal/templates/fibre/onelab__widget-login-user.html
new file mode 100644 (file)
index 0000000..9e24887
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="well login-widget">
+       {% if state %}
+       <span class="help-block">{{ state }}</span>
+       {% endif %}
+       <form action="/login/" method="post" role="form">
+         {% csrf_token %}
+         {% if next %}
+         <input type="hidden" name="next" value="{{ next }}" />
+         {% endif %}
+       <div class="form-group">
+       <label for="username">Email address / Username</label>
+       <input type="email" class="form-control" name="username" placeholder="Enter Email / username">
+       </div>
+       <div class="form-group">
+       <label for="password">Password</label>
+       <input type="password" class="form-control" name="password" placeholder="Password">
+       </div>
+       <div class="login-submit">
+               <input class="btn btn-default" type="submit" value="Sign In" />
+               <span class="lost-password">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="/portal/pass_reset/">Can't access your account?</a></span>
+       </div>
+       <div class="login-signup">
+               <a href="/portal/register">Try</a> or <a href="/portal/register">Sign Up</a>
+       </div>
+       </form>
+</div>
diff --git a/portal/templates/fibre/onelab__widget-topmenu.html b/portal/templates/fibre/onelab__widget-topmenu.html
new file mode 100644 (file)
index 0000000..da834ac
--- /dev/null
@@ -0,0 +1,76 @@
+
+<div id="header">
+       <div class="wrapper">
+               <div class="logo">
+                       <a href="/"><img src="{{ STATIC_URL }}img/onelab-portal.png" alt="OneLab - Future Internet Testbeds" /></a>
+               </div>
+               
+               <div id="secondary">
+                       <ul>
+                               <li>News</li>
+                               <li><a href="/portal/about">About</a></li>
+                               <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
+                               <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
+                       </ul>
+               </div>
+       </div>
+       
+       {% if username %}
+       <div id="navigation">
+               <div class="wrapper">
+               <ul>
+                       <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
+                       <li>|</li>
+                       <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
+                       <li class="slices">
+                               <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+                                       SLICES <span class="caret"></span>
+                       </a>
+                               
+                               <div class="dropdown-menu">
+                                               <ul>
+                                                       <li><a href="/portal/slice_request/">Request Slice</a></li>
+                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
+                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
+                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
+                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
+                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
+                                               </ul>
+                               </div>
+                               </li>
+                       <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
+                       <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
+                       <li>|</li>
+                       <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
+               </ul>
+               </div>
+       </div>
+       {% else %}
+       <div id="navigation">
+               <div class="wrapper"></div>
+       </div>
+       {% endif %}
+</div>
+<script>
+       $(document).ready(function() {
+               $('li.slices').mouseenter(function() {
+                       $('div#menu-slice-list').fadeIn(100);
+               });
+               $('div#menu-slice-list').mouseleave(function(e) {
+                       if (!$('li.slices').is(":hover")) {
+                               $(this).fadeOut(100);
+                       }
+               });
+               // var slices = localStorage.getItem('slices');
+               // if (slices.length == 0) {
+                       // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+                       // var items = [];
+                               // localStorage.setItem('slices', data[0].slice);
+                       // });
+               // }
+               // $.each(slices, function( key, val ) {
+                       // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+               // });
+               // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+       });
+</script>
diff --git a/portal/templates/fibre/onelab_home-view.html b/portal/templates/fibre/onelab_home-view.html
new file mode 100644 (file)
index 0000000..f3090b2
--- /dev/null
@@ -0,0 +1,119 @@
+{% extends "layout.html" %}
+
+{% block content %}
+<div class="row" id="home-dashboard">
+       <ul class="nav nav-tabs">
+         <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
+         <li><a class="home-tab" data-panel="manager" href="#">MANAGER</a></li>
+       </ul>
+       <div class="home-panel" id="user">
+               <table>
+                       <tr>
+                               <td>ACCOUNT</td>
+                               <td>SLICES</td>
+                               <td>SUPPORT</td>
+                       </tr>
+                       <tr>
+                               <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
+                               <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
+                               <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
+                       </tr>
+                       <tr>
+                               {% if person %}
+                               <td class="logged-in">
+                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
+                                       <div>
+                                       {% if person.last_name %}
+                                               {{person.first_name}} {{person.last_name}}<br />
+                                       {% endif %}
+                                       <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
+                               </div>
+                               {% else %}
+                               <td>
+                                       {% include 'onelab__widget-login-user.html' %}
+                               {% endif %}
+                               </td>
+                               <td>
+                               {% if person %}
+                                       <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
+                                       <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
+                               {% else %}
+                               {% endif %}
+                               </td>
+                               <td class="support">
+                                       <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
+                                       <div>
+                                               <a href="/portal/contact">Contact</a> <br />
+                                               <a href="/portal/support/documentation">Documentation</a>
+                                       </div>
+                               </td>
+                       </tr>
+               </table>
+       </div>
+       <div class="home-panel" id="manager">
+               <table>
+                       <tr>
+                               <td>INSTITUTION</td>
+                               <td>SLICES</td>
+                               <td>REQUESTS</td>
+                       </tr>
+                       <tr>
+                               <td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
+                               <td><a href="/portal/institution#slices"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
+                               <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
+                       </tr>
+                       <tr>
+                               {% if person %}
+                               <td class="logged-in">
+                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
+                               {% else %}
+                               <td>
+                                       {% include 'onelab__widget-login-manager.html' %}
+                               {% endif %}
+                               </td>
+                               <td>
+                                       {% if person %}
+                                   <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
+                                       {% endif %}
+                               </td>
+                               <td class="support">
+                                       {% if person %}
+                                   <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
+                                       {% endif %}
+                               </td>
+                       </tr>
+               </table>
+       </div>
+</div>
+<script>
+       $(document).ready(function() {
+               $('a.home-tab').click(function() {
+                       $('ul.nav-tabs li').removeClass('active');
+                       $(this).parent().addClass('active');
+                       $('div.home-panel').hide();
+                       $('div#'+$(this).data('panel')).show();
+               });
+               $('button#validaterequestbtn').click(function() {
+                       window.location="/portal/validate/";
+               });
+               $('button#ticketbtn').click(function() {
+                       window.location="/portal/contact/";
+               });
+               $('button#slicerequestbtn').click(function() {
+                       window.location="/portal/slice_request/";
+               });
+               
+               {% if person %}
+        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+                 var items = [];
+                 $.each( data[0].slices, function(i, val) {
+                       items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
+                 });
+                 
+                 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+                 
+               });
+               {% endif %}
+       });
+</script>
+{% endblock %}
diff --git a/portal/templates/institution-tab-info.html b/portal/templates/institution-tab-info.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/portal/templates/news.html b/portal/templates/news.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/portal/templates/onelab/onelab_base.html b/portal/templates/onelab/onelab_base.html
new file mode 100644 (file)
index 0000000..8513951
--- /dev/null
@@ -0,0 +1,43 @@
+{# This is required by insert_above #}{% insert_handler %}<!DOCTYPE html>
+<html lang="en"><head>
+<title>OneLab - {{ section }}</title>
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="shortcut icon" href="/static/img/myslice-icon.png">
+{# This is where insert_str will end up #}{% media_container prelude %}
+{% include 'messages-transient-header.html' %}
+<script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
+<script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+<script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
+<script src="{{ STATIC_URL }}js/myslice.js"></script>
+<script src="{{ STATIC_URL }}js/myslice-ui.js"></script>
+<style type="text/css">{# In case we need to add raw css code #}{% container prelude_css %}</style>
+{{ header_prelude }}
+{% block head %} {% endblock head %}
+{# let's add these ones no matter what #}
+{% insert_str prelude "js/jquery.min.js" %}
+{% insert_str prelude "js/jquery.html5storage.min.js" %}
+{% insert_str prelude "js/messages-runtime.js" %}
+{% insert_str prelude "js/class.js" %}
+{% insert_str prelude "js/plugin-helper.js" %}
+{% insert_str prelude "js/mustache.js" %}
+{% insert_str prelude "js/plugin.js" %}
+{% insert_str prelude "js/manifold.js" %}
+{% insert_str prelude "css/manifold.css" %}
+{% insert_str prelude "css/plugin.css" %}
+{% insert_str prelude "js/bootstrap.js" %}
+{% insert_str prelude "css/bootstrap.css" %}
+{% insert_str prelude "css/topmenu.css" %}
+{% insert_str prelude "js/logout.js" %}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
+</head>
+<body>
+{% block container %}
+       {% block topmenu %}
+       {% include theme|add:"__widget-topmenu.html" %}
+       {% endblock topmenu %}
+       {% include 'messages-transient.html' %}
+       {% block base_content %}
+       {% endblock %}
+{% endblock container %}
+</body>
+</html>
diff --git a/portal/templates/onelab/onelab_institution.html b/portal/templates/onelab/onelab_institution.html
new file mode 100644 (file)
index 0000000..0a424fa
--- /dev/null
@@ -0,0 +1,234 @@
+{% extends "layout_wide.html" %}
+
+{% block head %} 
+<script type="text/javascript" src="{{STATIC_URL}}/js/institution.js"></script>
+{% endblock head %}
+
+{% block content %}
+<div class="container">
+       <div class="row">
+               <div class="col-md-12">
+                       <ul class="nav nav-tabs nav-section">
+                               <li class="active"><a href="#info"><img src="{{ STATIC_URL }}icons/authority-xs.png" alt="Institution" /> Institution {{user_details.parent_authority}}</a></li>
+                               <li><a href="#users">Users</a></li>
+                               <li><a href="#slices">Slices</a></li>
+                       </ul>
+           </div>
+       </div>
+</div>
+<div class="container tab-content">
+       <div class="tab-pane active row" id="info">
+               <div class="col-md-12">
+                       <div id="authority-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Authority" /></div>
+                   <div id="authority-tab-loaded" style="display:none;">
+                       <div id="authority-data" style="float:left; width:50%;"></div>
+                               <div id="onelab_membership" style="float:right; width:50%;">
+                                   <img src="{{ STATIC_URL }}img/onelab-logo.png" alt="" /><br>
+                               <div id="onelab-data"></div>
+                               </div>
+                   </div>
+          </div>
+       </div>
+       
+       <div class="tab-pane row" id="users" data-authority="{{user_details.parent_authority}}">
+               <div class="col-md-12">
+                       <div id="user-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
+                               <div id="user-tab-loaded" style="display:none;">
+                               <table id="user-tab">
+                                       <tr>
+                                       <th>+/-</th>
+                                       <th>email</th>
+                                       <th>user_hrn</th>
+                                       <th>first name</th>
+                                       <th>last name</th>
+                                       <th>enabled</th>
+                                       </tr>
+                               </table>
+                               {%if 'is_pi'  in pi %}  
+                               <div>
+                                       <button id="deleteusers" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Users</button>
+                               </div>
+                               {%endif%}
+                       </div>
+               </div>
+       </div>
+
+       <div class="tab-pane row" id="slices">
+               {%if 'is_pi'  in pi %}
+               <button id="createslice" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> create slice</button>
+               {%else%}
+               <button id="createslice" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> request slice</button>
+               {%endif%}
+           <div id="slice-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
+           <div id="slice-tab-loaded" style="display:none;">
+               <table id="slice-tab">
+                   <tr>
+                       <th>+/-</th>
+                       <th>slice_hrn</th>
+                       <th>users</th>
+                       <th>url</th>
+                       <th>nodes</th>
+                       <th>expiration</th>
+                   </tr>
+               </table>
+               <br>
+                       {%if 'is_pi'  in pi %}
+               <div>
+                   <button id="renewslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Renew Slices</button>
+                   <button id="deleteslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Slices</button>
+               </div>
+                       {%endif%} 
+           </div>
+       </div>
+</div>
+<script>
+    $(document).ready(function() {
+        {% if person %}
+        {% if user_details.parent_authority %}
+        
+        $.post("/rest/authority/",{'filters':{'authority_hrn':'{{user_details.parent_authority}}'}}, function( data ) {
+            var authority_data = [];
+            var onelab_data = [];
+                       /* 'city','enabled','legal','longitude','onelab_membership','address','parent_authority','slice','user','country',
+            'tech','abbreviated_name','url','postcode','description','scientific','authority_hrn','latitude','name'    */
+            $.each( data, function( key, val ) {
+                authority_row = "<img src='{{ STATIC_URL }}img/institutions/{{user_details.parent_authority}}.gif' alt='' /><br>";
+                authority_row += "<br>";
+                authority_row += "<b>authority:</b> "+val.authority_hrn+"<br>";
+                               authority_row += "<br>";
+                authority_row += "<b>"+val.name+"</b><br>";
+                authority_row += "<br>";
+                authority_row += "<b>Address:</b> "+val.address+"<br>";
+                authority_row += "<b>City:</b> "+val.postcode+" "+val.city+"<br>";
+                authority_row += "<br>";
+                authority_row += "<b>Country:</b> "+val.country+"<br>";
+                authority_row += "<br>";
+                authority_row += "<br>";
+                authority_row += "<h2>Contacts</h2>";
+                authority_row += "<b>Legal:</b> ";
+                               /*
+
+                TODO: find a way to express JSON correctly given the constrains: CSV / JSON
+
+                legal = jQuery.parseJSON(val.legal);
+                if($.isArray(legal)){
+                    $.each(legal, function(k,v){
+                        authority_row += k+" "+v+"<br>";
+                    });
+                }else{
+                */
+                    authority_row += val.legal+"<br>";
+                //}
+                authority_row += "<br>";
+                authority_row += "<b>Scientific:</b> ";
+                /*
+                scientific = jQuery.parseJSON(val.scientific);
+                if($.isArray(scientific)){
+                    $.each(scientific, function(v){
+                        authority_row += v+", ";
+                    });
+                }else{
+                */
+                    authority_row += val.scientific+"<br>";
+                //}
+                onelab_membership = "<b>Status: </b>"+val.onelab_membership;
+                onelab_data.push(onelab_membership);
+                authority_data.push(authority_row);
+
+            });
+            $("div#authority-data").html(authority_data.join( "" ));
+            $("div#onelab-data").html(onelab_data.join( "" ));
+            $("div#authority-tab-loaded").css("display","block");
+            $("div#authority-tab-loading").css("display","none");
+         });
+
+        $.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+            var list_slices = [];
+            var table_slices = [];
+            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "users", "slice_urn", "slice_expires" */
+            $.each( data, function( key, val ) {
+                list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+                if(val.nodes=="undefined" || val.nodes==null){
+                    nodes_length=0;
+                }else{
+                    nodes_length=val.nodes.length;
+                }
+                console.log(val);
+                if(val.users=="undefined" || val.users==null){
+                    users_length=0;
+                }else{
+                    users_length=val.users.length;
+                }
+
+                if(val.slice_url=="undefined" || val.slice_url==null){
+                    slice_url="";
+                }else{
+                    slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
+                }
+                
+                slice_row = "<tr id='"+val.slice_hrn+"'>";
+                slice_row += "<td><input type='checkbox' class='slice' id='"+val.slice_hrn+"'></td>";
+                slice_row += "<td><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
+                slice_row += "<td>"+users_length+"</td>";
+                slice_row += "<td>"+slice_url+"</td>";
+                slice_row += "<td>"+nodes_length+"</td>";
+                slice_row += "<td>"+val.slice_expires+"</td>";
+                slice_row += "</tr>";
+                table_slices.push(slice_row);
+                
+            });
+           
+            /* $("div#slice-list").html($( "<ul/>", { html: list_slices.join( "" ) })); */
+            $("table#slice-tab tr:last").after(table_slices.join( "" ));
+            $("div#slice-tab-loaded").css("display","block");
+            $("div#slice-tab-loading").css("display","none");
+        });
+               
+               
+         $.post("/rest/user/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+             var list_users = [];
+             var table_users = [];
+                        /* Available fields
+                        user_gid, user_enabled, slices, pi_authorities, keys, parent_authority, user_first_name,
+                        user_urn, user_last_name, user_phone, user_hrn, user_email, user_type
+                        */
+             $.each( data, function( key, val ) {
+                 list_users.push( "<li><a href=\"portal/user/"+val.user_email+"\">" + val.user_email + "</a></li>" );
+                 user_row = "<tr id='"+val.user_hrn+"'>";
+                 user_row += "<td><input type='checkbox' class='user' id='"+val.user_hrn+"'></td>";
+                 user_row += "<td>"+val.user_email+"</td>";
+                 user_row += "<td>"+val.user_hrn+"</td>";
+                 user_row += "<td>"+val.user_first_name+"</td>";
+                 user_row += "<td>"+val.user_last_name+"</td>";
+                                user_row += "<td>"+val.user_enabled+"</td>";
+                 user_row += "</tr>";
+                 table_users.push(user_row);
+//                 
+             });
+             $("table#user-tab tr:last").after(table_users.join( "" ));
+             $("div#user-tab-loaded").css("display","block");
+             $("div#user-tab-loading").css("display","none");
+          });
+
+               $('button#deleteusers').click(function() {
+               $('input:checkbox.user').each(function (index) {
+                       if(this.checked){
+                       var record_id = this.id;
+                       $.post("/delete/user/",{'filters':{'user_hrn':this.id}}, function(data) {
+                       if(data.success){
+                       $('tr[id="'+record_id+'"]').fadeOut("slow");
+                       $('tr[id="'+record_id+'"]').remove();
+                       }else{
+                       alert("Rest Error for "+record_id+": "+data.error);
+                       }   
+               });     
+               } 
+       }); 
+       }); 
+ {% endif %}
+ {% endif %}
+});
+
+
+</script>
+{% endblock %}
diff --git a/portal/templates/onelab/onelab_news.html b/portal/templates/onelab/onelab_news.html
new file mode 100644 (file)
index 0000000..a06b125
--- /dev/null
@@ -0,0 +1,19 @@
+{% extends "layout_wide.html" %}
+
+{% block content %}
+<div class="container">
+    <div class="row">
+        <div class="col-md-12">
+               <h1><a href="#about"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="News" />News</a></h1>
+               <br />
+        </div>
+    </div>
+       <div class="row">
+        <div class="col-md-12">
+
+               The <b>OneLab</b> Portal opens with the <b>PlanetLab Europe</b>, <b>IOTLab</b> and <b>NITOS</b> testbeds!
+               </div>
+       </div>
+</div>
+{% endblock %}
diff --git a/portal/templates/onelab/onelab_widget-news.html b/portal/templates/onelab/onelab_widget-news.html
new file mode 100644 (file)
index 0000000..83cec76
--- /dev/null
@@ -0,0 +1,5 @@
+<div class="alert alert-info alert-dismissable">
+<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
+<span class="glyphicon glyphicon-globe"></span>
+The <b>OneLab</b> Portal opens with the <b>PlanetLab Europe</b>, <b>IOTLab</b> and <b>NITOS</b> testbeds!
+</div>
\ No newline at end of file
diff --git a/portal/templates/onelab/onelab_widget-topmenu.html b/portal/templates/onelab/onelab_widget-topmenu.html
new file mode 100644 (file)
index 0000000..6236344
--- /dev/null
@@ -0,0 +1,71 @@
+
+<div id="header">
+       <div class="wrapper">
+               <div class="logo">
+                       <a href="/"><img src="{{ STATIC_URL }}img/onelab-portal.png" alt="OneLab - Future Internet Testbeds" /></a>
+               </div>
+               
+               <div id="secondary">
+                       <ul>
+                               <li><a href="/news">News</a></li>
+                               <li><a href="/portal/about">About</a></li>
+                               <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
+                               <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
+                       </ul>
+               </div>
+       </div>
+       
+       {% if username %}
+       <div id="navigation">
+               <div class="wrapper">
+               <ul>
+                       <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
+                       <li>|</li>
+                       <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
+                       <li class="slices">
+                               <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+                                       SLICES <span class="caret"></span>
+                       </a>
+                               
+                               <div class="dropdown-menu" style="z-index:99;">
+                                               <ul id="dropdown-slice-list">
+                                                       <li><a href="/portal/slice_request/">Request Slice</a></li>
+                                               </ul>
+                               </div>
+                               </li>
+                       <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
+                       <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
+                       <li>|</li>
+                       <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
+               </ul>
+               </div>
+       </div>
+       {% else %}
+       <div id="navigation">
+               <div class="wrapper"></div>
+       </div>
+       {% endif %}
+</div>
+<script>
+       $(document).ready(function() {
+               $('li.slices').mouseenter(function() {
+                       $('div#menu-slice-list').fadeIn(100);
+               });
+               $('div#menu-slice-list').mouseleave(function(e) {
+                       if (!$('li.slices').is(":hover")) {
+                               $(this).fadeOut(100);
+                       }
+               });
+               // var slices = localStorage.getItem('slices');
+               // if (slices.length == 0) {
+                       // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+                       // var items = [];
+                               // localStorage.setItem('slices', data[0].slice);
+                       // });
+               // }
+               // $.each(slices, function( key, val ) {
+                       // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
+               // });
+               // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
+       });
+</script>
diff --git a/portal/templates/slice-resource-view.html b/portal/templates/slice-resource-view.html
new file mode 100644 (file)
index 0000000..556db48
--- /dev/null
@@ -0,0 +1,95 @@
+{% extends "layout_wide.html" %}
+{% load portal_filters %}
+
+{% block head %}
+<!-- <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC1RUj824JAiHRVqgc2CSIg4CpKHhh84Lw&sensor=false"></script> -->
+<script src="{{ STATIC_URL }}js/onelab_slice-resource-view.js"></script>
+<script>
+       //myslice.slice = "{{ slice }}";
+</script>
+{% endblock %}
+
+{% block content %}
+       <div class="col-md-2">
+               
+               <div class="list-group-item list-resources">
+                       <span class="list-group-item-heading">View</span>
+                       <a class="list-group-item active" data-panel="resources" href="#">All</a>
+                       <a class="list-group-item" data-panel="reserved" href="#">Reserved</a>
+                       <a class="list-group-item" data-panel="pending" href="#">Pending <span class="badge" id="badge-pending" data-number="0"></span></a>
+               </div>
+               
+               <!-- <div id="select-platform" class="list-group"></div> -->
+               {{filter_testbeds}}
+       </div>
+       <div class="col-md-10" style="height:100%;">
+               <div class="row">
+                       {% widget '_widget-slice-sections.html' %}
+               </div>
+               <!-- <div class="row slice-pending">
+                       <ul class="nav nav-pills">
+                               <li><a href="">Unreserved</a></li>
+                               <li><a href="">Reserved</a></li>
+                               <li><a href="">Pending<span class="badge" id="badge-pending" style="display:none;"></span></a></li>
+                               <li>
+                                       <button type="button" class="btn btn-primary apply" id="ApplyPendind">Apply</button>
+                                       <button type="button" class="btn btn-default clear">Clear</button>
+                               </li>
+                               <li>
+                                       <div id="loading" style="display:none;"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading" /></div>
+                               </li>
+                       </ul>
+               </div> -->
+               <div class="row">
+                       {% if msg %}
+                       <div class="col-md-12"><p class="alert-success">{{ msg }}</p></div>
+                       {% endif %}
+               </div>
+               <div class="row">
+                       <ul class="nav nav-pills nav-resources">
+                         <li class="active"><a data-panel="resources" href="#">Table</a></li>
+                         <li id="GoogleMap"><a data-panel="map" href="#">Map</a></li>
+                         <li id="Scheduler"><a data-panel="scheduler-tab" href="#">Scheduler</a></li>
+                       </ul>
+               </div>
+
+               <!-- Modal - columns selector -->
+               <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+                       <div class="modal-dialog">
+                       <div class="modal-content">
+                               <div class="modal-header">
+                                       <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+                                               <h4 class="modal-title" id="myModalLabel">Columns selector</h4>
+                               </div>
+                               <div class="modal-body">
+                                       {{columns_editor}}
+                               </div>
+                               <div class="modal-footer">
+                                       <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+                               </div>
+                       </div>
+                       </div>
+               </div>
+               
+               <div class="row" style="height:100%;">
+                       <div id="resources" class="panel">
+                                <!-- Button trigger modal - columns selector -->
+                               <button class="btn btn-primary btn-sm" style="float:right;" data-toggle="modal" data-target="#myModal">Select columns</button>
+                {{list_resources}}
+                               <!-- <table cellpadding="0" cellspacing="0" border="0" class="table" id="objectList"></table> -->
+                       </div>
+                       <div id="reserved" class="panel" style="height:370px;display:none;">
+                {{list_reserved_resources}}
+                       </div>
+                       <div id="map" class="panel" style="height:370px;display:none;">
+                {{map_resources}}
+                       </div>
+                       <div id="scheduler-tab" class="panel" style="height:370px;display:none;">
+                {{scheduler}}
+                       </div>
+                       <div id="pending" class="panel" style="height:370px;display:none;">
+                {{pending_resources}}
+                       </div>
+               </div>
+       </div>
+{% endblock %}
diff --git a/portal/templates/slice-tab-experiment.html b/portal/templates/slice-tab-experiment.html
new file mode 100644 (file)
index 0000000..db9b282
--- /dev/null
@@ -0,0 +1,25 @@
+<div class="col-md-2">
+</div>
+<div class="col-md-8">
+       <h2>Secure Shell (SSH)</h2>
+       <p><img src="{{ STATIC_URL }}img/terminal_icon.png" width="50"></p>
+       <p>
+       Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
+       </p>
+       <p> More Info: <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">http://en.wikipedia.org/wiki/Secure_Shell</a></p>
+       <br>
+       <br>
+       <p><img src="{{ STATIC_URL }}img/nepi_logo.png" width="90"></p>
+       <p>NEPI, the Network Experimentation Programming Interface, is a life-cycle management tool for network experiments. The idea behind NEPI is to provide a single tool to design, deploy, and control network experiments, and gather the experiment results. Going further, NEPI was specially conceived to function with arbitrary experimentation platforms, so researchers could use a single tool to work with network simulators, emulators, or physical testbeds, or even a mixture of them. To accomplish this, NEPI provides a high-level interface to describe experiments that is independent from any experimentation platform, but is able to capture platform specific configurations. Experiment definitions can be stored in XML format to be later reproduced, and modified according to experimentation needs. Experiment execution is orchestrated by a global experiment controller, that is platform independent, and different platform-dependent testbed controllers, creating a control hierarchy that is able t adapt to platform specific requirements while providing an integrated control scheme.</p>
+       <p> More Info: <a href="http://nepi.inria.fr" target="_blank">http://nepi.inria.fr</a></p>
+       <br>
+       <p><img src="{{ STATIC_URL }}img/omf-logo.png" width="90"></p>
+       <p>OMF is a Testbed Control, Measurement and Management Framework.</p>
+       <p>
+       OMF was originally developed for the ORBIT wireless testbed at Winlab, Rutgers University. Since 2007, OMF has been actively extended to operate on testbeds with many different type of network and resource technologies. It is now deployed and used on different testbeds in Australia, Europe, and in the U.S. OMF is currently being extended further to support exciting new features and technologies. This website is hosting this ongoing activity. OMF development is now conducted essentially within the TEMPO project at NICTA (Australia) in strong collaboration with Winlab (Rutgers University).
+       </p>
+       <p>In addition to the main OMF software, this site also hosts OMF sub-projects addressing various related aspects of a testbed's control, measurement, and management.</p>
+       <p>More Info: <a href="http://mytestbed.net/projects/omf" target="_blank">http://mytestbed.net/projects/omf</a></p>
+</div>
+<div class="col-md-2">
+</div>
diff --git a/portal/templates/slice-tab-users-view.html b/portal/templates/slice-tab-users-view.html
new file mode 100644 (file)
index 0000000..daefe94
--- /dev/null
@@ -0,0 +1,111 @@
+       <div class="col-md-2">
+               <div id="select-platform" class="list-group">
+               </div>
+                       
+               <ul class="list-group">
+                 <li class="list-group-item">Authority:<b> {{user_details.parent_authority}}</b>
+                       <!--<select id="auth_list">
+                               <option value="ple.upmc">UPMC</option>
+                               <option value="ple.inria">INRIA</option>
+                               <option value="ple.nitos">NITOS</option>
+                               <option value="ple.iminds">iMinds</option>
+                       </select> -->
+                 </li>
+                 <li class="list-group-item">Filter: slice</li>
+                 <li class="list-group-item">...</li>
+                 <li class="list-group-item">...</li>
+                 <li class="list-group-item">...</li>
+               </ul>
+       
+       </div>
+       <div class="col-md-10">
+               <div class="row">
+               </div>
+               <div id="user-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Useres" /></div>
+               <div id="user-tab-loaded" style="display:none;">
+               <table id="user-tab">
+                       <tr>
+                       <th>+/-</th>
+                       <th>Email</th>
+                       <th>user_hrn</th>
+                       <th>Enabled</th>
+                       </tr>
+               </table>
+                               {% if 'is_pi'  in pi %}
+                               <button id="addusers" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span>Add users</button>
+                               {%endif%}
+               </div>
+<script>
+    $(document).ready(function() {
+                       var slice_users = [];
+                       //console.log("the value you selected: " + selectedValue);
+               $.post("/rest/user/",{'filters':{'parent_authority': "{{user_details.parent_authority}}"}}, function( data ) {
+               var list_users = [];
+               var table_users = [];
+                               /* Available fields
+                               user_gid, user_enabled, slices, pi_authorities, keys, parent_authority, user_first_name,
+                           user_urn, user_last_name, user_phone, user_hrn, user_email, user_type
+                               */
+               $.each( data, function( key, val ) {
+                       list_users.push( "<li><a href=\"portal/user/"+val.user_email+"\">" + val.user_email + "</a></li>" );
+                       user_row = "<tr>";
+                                       // checking the box for the users that belong to the selected slice
+                                       var flag_checkbox = 0;
+                                       for(var data in val.slices) {
+                                       var element = val.slices[data];
+                                               if (element == "{{slice}}"){
+                                                       //console.log("the slice is: "+ element);       
+                                                       flag_checkbox = 1;
+                                                       slice_users.push (val.user_email)
+                                                       user_row += "<td><input type='checkbox' checked='True'></td>";
+                                               }
+                                       }
+                                       if(flag_checkbox != 1){
+                               user_row += "<td><input type='checkbox' class='user'></td>";
+                                       }
+                       user_row += "<td>"+val.user_email+"</td>";
+                       user_row += "<td>"+val.user_hrn+"</td>";
+                                       user_row += "<td>"+val.user_enabled+"</td>";
+                       user_row += "</tr>";
+                       table_users.push(user_row);
+                
+               });
+                                console.log("slice users before")
+                                console.log(slice_users)
+
+                               $("table#user-tab tr:last").after(table_users.join( "" ));
+               $("div#user-tab-loaded").css("display","block");
+               $("div#user-tab-loading").css("display","none");
+
+                               $('button#addusers').click(function() {
+               $('input:checkbox.user').each(function (index) {
+               if(this.checked){
+                       var record_id = this.id;
+                                       console.log("checked")
+                                       console.log($(this)
+                                               .closest('tr') //get the enclosing tr
+                                               .find('td:eq(1)'));  //find any using td:eq(<index>)
+                                       slice_users.push ("yasin.upmc@gmail.com")
+                                       console.log("after")
+                                       console.log(slice_users)
+                                       //console.log(user_email)
+                       $.post("/update/slice/",{'filters':{'slice_hrn':'{{slice}}'},'params':{'users':slice_users}}, function(data) {
+                       if(data.success){
+                               // TODO: highlight row after success
+                               //$('tr[id="'+record_id+'"]').highlight();
+                       }else{
+                               alert("Rest Error for "+record_id+": "+data.error);
+                       }
+                       });
+                
+               }
+               });
+               // TODO: refresh table
+               //window.location="/portal/institution#slices";
+       });
+
+               });
+       //      });
+    });
+</script>
+
diff --git a/portal/templates/slice-view.html b/portal/templates/slice-view.html
new file mode 100644 (file)
index 0000000..d9ca050
--- /dev/null
@@ -0,0 +1,26 @@
+{% extends "layout_wide.html" %}
+{% load portal_filters %}
+
+{% block head %}
+
+{% endblock %}
+
+{% block content %}
+
+<div class="container">
+       <div class="row">
+               <div class="col-md-12">
+                       {% widget "_widget-slice-sections.html" %}
+           </div>
+       </div>
+</div>
+<div class="container-fluid tab-content">
+  <div class="tab-pane active row" id="info">...</div>
+  <div class="tab-pane row" id="testbeds">...</div>
+  <div class="tab-pane row" id="resources">...</div>
+  <div class="tab-pane row" id="users">...</div>
+  <div class="tab-pane row" id="statistics">...</div>
+  <div class="tab-pane row" id="measurements">...</div>
+  <div class="tab-pane row" id="experiment">...</div>
+</div>         
+{% endblock %}
diff --git a/portal/templatetags/__init__.py b/portal/templatetags/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/portal/templatetags/portal_filters.py b/portal/templatetags/portal_filters.py
new file mode 100644 (file)
index 0000000..9bd0175
--- /dev/null
@@ -0,0 +1,40 @@
+from django import template
+from django.template.loader_tags import do_include
+from myslice.settings import theme
+
+register = template.Library()
+
+class IncludeNode(template.Node):
+    
+    def __init__(self, template_name):
+        if theme :
+            self.theme_template_name = "%s%s" % (theme, template_name)
+        self.template_name = template_name
+
+    def render(self, context):
+        try:
+            # Loading the template and rendering it
+            included_template = template.loader.get_template(self.theme_template_name).render(context)
+        except template.TemplateDoesNotExist:
+            # template theme does not exists, try the generic one
+            try:
+                # Loading the template and rendering it
+                included_template = template.loader.get_template(self.template_name).render(context)
+            except template.TemplateDoesNotExist:
+                included_template = ''
+                
+        return included_template
+
+@register.tag
+def widget(parser, token):
+    """Usage: {% widget "widget.html" %}
+
+    This will fail silently if the template doesn't exist. If it does, it will
+    be rendered with the current context."""
+    try:
+        tag_name, template_name = token.split_contents()
+    except ValueError:
+        raise template.TemplateSyntaxError, \
+            "%r tag requires a single argument" % token.contents.split()[0]
+
+    return IncludeNode(template_name[1:-1])
\ No newline at end of file
diff --git a/third-party/jquery-ui-slider b/third-party/jquery-ui-slider
new file mode 120000 (symlink)
index 0000000..308befe
--- /dev/null
@@ -0,0 +1 @@
+jquery-ui-slider-1.10.3
\ No newline at end of file
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100755 (executable)
index 0000000..5b5dab2
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_flat_0_aaaaaa_40x100.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100755 (executable)
index 0000000..ad3d634
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_55_fbf9ee_1x400.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_65_ffffff_1x400.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100755 (executable)
index 0000000..42ccba2
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_dadada_1x400.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100755 (executable)
index 0000000..5a46b47
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_dadada_1x400.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100755 (executable)
index 0000000..86c2baa
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_e6e6e6_1x400.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_ffffff_1x400.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_ffffff_1x400.png
new file mode 100755 (executable)
index 0000000..e65ca12
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_glass_75_ffffff_1x400.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100755 (executable)
index 0000000..7c9fa6c
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100755 (executable)
index 0000000..0e05810
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_222222_256x240.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_222222_256x240.png
new file mode 100755 (executable)
index 0000000..b273ff1
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_222222_256x240.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_2e83ff_256x240.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_2e83ff_256x240.png
new file mode 100755 (executable)
index 0000000..09d1cdc
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_2e83ff_256x240.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_454545_256x240.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_454545_256x240.png
new file mode 100755 (executable)
index 0000000..59bd45b
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_454545_256x240.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_888888_256x240.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_888888_256x240.png
new file mode 100755 (executable)
index 0000000..6d02426
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_888888_256x240.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_cd0a0a_256x240.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_cd0a0a_256x240.png
new file mode 100755 (executable)
index 0000000..2ab019b
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_f6cf3b_256x240.png b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_f6cf3b_256x240.png
new file mode 100755 (executable)
index 0000000..c986935
Binary files /dev/null and b/third-party/jquery-ui-slider-1.10.3/css/images/ui-icons_f6cf3b_256x240.png differ
diff --git a/third-party/jquery-ui-slider-1.10.3/css/jquery-ui-1.10.3.slider.min.css b/third-party/jquery-ui-slider-1.10.3/css/jquery-ui-1.10.3.slider.min.css
new file mode 100755 (executable)
index 0000000..3b7a2c1
--- /dev/null
@@ -0,0 +1,1614 @@
+/*!
+ * jQuery UI Bootstrap (0.5)
+ * http://addyosmani.github.com/jquery-ui-bootstrap
+ *
+ * Copyright 2012 - 2013, Addy Osmani
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Portions copyright jQuery UI & Twitter Bootstrap
+ */
+
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { 
+  border: 0; clip: rect(0 0 0 0);
+  height: 1px; 
+  margin: -1px; 
+  overflow: hidden; 
+  padding: 0; 
+  position: absolute; 
+  width: 1px; 
+}
+.ui-helper-reset { 
+  margin: 0; 
+  padding: 0; 
+  border: 0; 
+  outline: 0; 
+  line-height: 1.3; 
+  text-decoration: none; 
+  font-size: 100%; 
+  list-style: none; 
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+  content: "";
+  display: table;
+}
+.ui-helper-clearfix:after { 
+  content: "."; 
+  display: block; 
+  height: 0; 
+  clear: both; 
+  visibility: hidden; 
+}
+.ui-helper-clearfix { 
+  /*display: inline-block; */
+  display:block;
+  min-height: 0; /* support: IE7 */
+}
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { 
+  height:1%; 
+}
+
+/* end clearfix */
+.ui-helper-zfix { 
+  width: 100%; 
+  height: 100%; 
+  top: 0; 
+  left: 0; 
+  position: absolute; 
+  opacity: 0; 
+  filter:Alpha(Opacity=0); 
+}
+.ui-front {
+  z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { 
+  display: block; 
+  text-indent: -99999px; 
+  overflow: hidden; 
+  background-repeat: no-repeat; 
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { 
+  position: absolute; 
+  top: 0; 
+  left: 0; 
+  width: 100%; 
+  height: 100%; 
+}
+
+/*
+ * jQuery UI Resizable 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/resizable/
+ */
+
+.ui-resizable { 
+  position: relative;
+}
+.ui-resizable-handle { 
+  position: absolute;
+  font-size: 0.1px;
+  z-index: 99999; 
+  display: block; 
+}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { 
+  display: none; 
+}
+.ui-resizable-n { 
+  cursor: n-resize; 
+  height: 7px; 
+  width: 100%; 
+  top: -5px; 
+  left: 0; 
+}
+.ui-resizable-s { 
+  cursor: s-resize; 
+  height: 7px; 
+  width: 100%; 
+  bottom: -5px; 
+  left: 0; 
+}
+.ui-resizable-e { 
+  cursor: e-resize; 
+  width: 7px; 
+  right: -5px; 
+  top: 0; 
+  height: 100%; 
+}
+.ui-resizable-w { 
+  cursor: w-resize; 
+  width: 7px; 
+  left: -5px; 
+  top: 0; 
+  height: 100%; 
+}
+.ui-resizable-se { 
+  cursor: se-resize; 
+  width: 12px; 
+  height: 12px; 
+  right: 1px; 
+  bottom: 1px; 
+}
+.ui-resizable-sw { 
+  cursor: sw-resize; 
+  width: 9px; 
+  height: 9px; 
+  left: -5px; 
+  bottom: -5px; 
+}
+.ui-resizable-nw { 
+  cursor: nw-resize; 
+  width: 9px; 
+  height: 9px; 
+  left: -5px; 
+  top: -5px; 
+}
+.ui-resizable-ne { 
+  cursor: ne-resize; 
+  width: 9px; 
+  height: 9px; 
+  right: -5px; 
+  top: -5px;
+}
+
+/*
+ * jQuery UI Selectable 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/selectable/
+ */
+.ui-selectable-helper { 
+  position: absolute; 
+  z-index: 100; 
+  border:1px dotted black; 
+}
+
+/*
+ * jQuery UI CSS Framework 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * 
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
+ */
+
+/* Component containers
+----------------------------------*/
+.ui-widget {   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size:13px; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #404040; }
+.ui-widget-content a { color: #404040; }
+.ui-widget-header {
+  font-weight:bold;
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border:1px solid #666;
+
+ }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear background-image;
+  -moz-transition: 0.1s linear background-image;
+  -ms-transition: 0.1s linear background-image;
+  -o-transition: 0.1s linear background-image;
+  transition: 0.1s linear background-image;
+   overflow: visible;
+
+ }
+
+
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
+  background-position: 0 -15px;
+  color: #333;
+  text-decoration: none;
+ }
+
+.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa;  font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+
+
+.ui-state-highlight p, .ui-state-error p, .ui-state-default p{
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 18px;
+  margin:7px 15px;
+}
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {
+
+
+  position: relative;
+  margin-bottom: 18px;
+  color: #404040;
+  background-color: #eedc94;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));
+  background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));
+  background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
+  background-image: -o-linear-gradient(top, #fceec1, #eedc94);
+  background-image: linear-gradient(top, #fceec1, #eedc94);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #eedc94 #eedc94 #e4c652;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  border-width: 1px;
+  border-style: solid;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+
+
+}
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
+
+
+  position: relative;
+  margin-bottom: 18px;
+  color: #ffffff;
+  border-width: 1px;
+  border-style: solid;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
+ background-color: #c43c35;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(top, #ee5f5b, #c43c35);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #c43c35 #c43c35 #882a25;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+
+
+}
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none;  }
+.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_f6cf3b_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, 
+.ui-corner-top, 
+.ui-corner-left, 
+.ui-corner-tl { 
+  -moz-border-radius-topleft: 4px; 
+  -webkit-border-top-left-radius: 4px; 
+  -khtml-border-top-left-radius: 4px; 
+  border-top-left-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-top, 
+.ui-corner-right, 
+.ui-corner-tr { 
+  -moz-border-radius-topright: 4px; 
+  -webkit-border-top-right-radius: 4px; 
+  -khtml-border-top-right-radius: 4px; 
+  border-top-right-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-bottom, 
+.ui-corner-left, 
+.ui-corner-bl { 
+  -moz-border-radius-bottomleft: 4px; 
+  -webkit-border-bottom-left-radius: 4px; 
+  -khtml-border-bottom-left-radius: 4px; 
+  border-bottom-left-radius: 4px; 
+}
+.ui-corner-all, 
+.ui-corner-bottom, 
+.ui-corner-right, 
+.ui-corner-br { 
+  -moz-border-radius-bottomright: 4px; 
+  -webkit-border-bottom-right-radius: 4px; 
+  -khtml-border-bottom-right-radius: 4px; 
+  border-bottom-right-radius: 4px; 
+}
+
+
+/* Overlays */
+
+.ui-widget-overlay { 
+  background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 
+  opacity: .30;
+  filter:Alpha(Opacity=30); 
+}
+
+.ui-widget-shadow { 
+  margin: -8px 0 0 -8px; 
+  padding: 8px; 
+  background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 
+  opacity: .30;filter:Alpha(Opacity=30); 
+  -moz-border-radius: 8px; 
+  -khtml-border-radius: 8px; 
+  -webkit-border-radius: 8px; 
+  border-radius: 8px; 
+}
+
+/*
+ * jQuery UI Accordion 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/accordion/
+ */
+
+/* IE/Win - Fix animation bug - #4615 */
+
+.ui-accordion { 
+  width: 100%; 
+}
+.ui-accordion .ui-accordion-header { 
+  cursor: pointer; 
+  position: relative; 
+  margin-top: 1px; 
+  zoom: 1; 
+  font-weight:bold; 
+}
+.ui-accordion .ui-accordion-li-fix { 
+  display: inline; 
+}
+.ui-accordion .ui-accordion-header-active { 
+  border-bottom: 0 !important; 
+}
+.ui-accordion .ui-accordion-header a { 
+  display: block; 
+  font-size: 1em; 
+  padding: .5em .5em .5em 1.7em; 
+}
+.ui-accordion-icons .ui-accordion-header a { 
+  padding-left: 2.2em; 
+}
+.ui-accordion .ui-accordion-header .ui-icon { 
+  position: absolute; 
+  left: .5em; 
+  top: 50%; 
+  margin-top: -8px; 
+}
+.ui-accordion .ui-accordion-content { 
+  padding: 1em 2.2em; 
+  border-top: 0; 
+  margin-top: -2px; 
+  position: relative; 
+  top: 1px; 
+  margin-bottom: 2px; 
+  overflow: auto; 
+  display: none; 
+  zoom: 1; 
+}
+.ui-accordion .ui-accordion-content-active { 
+  display: block; 
+}
+
+/*
+ * jQuery UI Autocomplete 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/autocomplete/
+ */
+
+.ui-autocomplete { 
+  position: absolute; 
+  top: 0;
+  left: 0;
+  cursor: default; 
+}
+
+/*
+ * jQuery UI Button 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+
+.ui-button {
+
+  cursor: pointer;
+  display: inline-block;
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  padding: 5px 14px 6px;
+  margin: 0;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear background-image;
+  -moz-transition: 0.1s linear background-image;
+  -ms-transition: 0.1s linear background-image;
+  -o-transition: 0.1s linear background-image;
+  transition: 0.1s linear background-image;
+   overflow: visible;
+} /* the overflow property removes extra width in IE */
+
+.ui-button-primary {
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+
+.ui-button-success{
+  color:#ffffff;
+  background-color: #57a957;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
+  background-image: -moz-linear-gradient(top, #62c462, #57a957);
+  background-image: -ms-linear-gradient(top, #62c462, #57a957);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
+  background-image: -webkit-linear-gradient(top, #62c462, #57a957);
+  background-image: -o-linear-gradient(top, #62c462, #57a957);
+  background-image: linear-gradient(top, #62c462, #57a957);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #57a957 #57a957 #3d773d;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-error{
+  color:#ffffff;
+  background-color: #c43c35;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(top, #ee5f5b, #c43c35);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #c43c35 #c43c35 #882a25;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+
+.ui-button .ui-button-text { display: block;   }
+.ui-button-text-only .ui-button-text {  }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; /*tempfix*/ display:none;}
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+/* input.ui-button { padding: .4em 1em; } */
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { top: 50%; margin-top:-3px; margin-bottom:3px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+
+
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-state-active {
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.4em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+
+
+/*
+ * jQuery UI Menu 1.10.0
+ *
+* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+
+.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float:left; outline: none; }
+.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
+.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1;float: left;clear: left; width: 100%; }
+.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
+.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
+.ui-menu .ui-menu-item a.ui-state-focus,
+.ui-menu .ui-menu-item a.ui-state-active { 
+  font-weight: normal; 
+  margin: 0; 
+  color: #ffffff;
+  background: #0064cd;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/* Fix problem with border in ui-state-active */
+.ui-menu .ui-menu-item a.ui-state-active {
+  padding: 1px .4em;
+}
+
+.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
+.ui-menu .ui-state-disabled a { cursor: default; }
+
+/* icon support */
+.ui-menu-icons { position: relative; }
+.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
+
+/* left-aligned */
+.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
+
+/* right-aligned */
+.ui-menu .ui-menu-icon { position: static; float: right; }
+
+.ui-menu { width: 200px; margin-bottom: 2em; }
+
+
+/*
+ * jQuery UI spinner 1.10.0
+ *
+* Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+
+.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
+.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
+.ui-spinner{}
+.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
+.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
+.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
+.ui-spinner-up { top: 0; }
+.ui-spinner-down { bottom: 0; }
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+    /* need to fix icons sprite */
+    background-position:-65px -16px;
+}
+
+/*
+ * jQuery UI Dialog 1.10.0
+ *
+ * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { 
+  position: absolute; 
+  top: 0; 
+  left: 0; 
+  padding: .2em; 
+  width: 300px; 
+  overflow: hidden; 
+  outline: 0; 
+  background-clip: padding-box;
+  background-color: #FFFFFF;
+  border: 1px solid rgba(0, 0, 0, 0.3);
+  border-radius: 6px 6px 6px 6px;
+  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  /*left: 50%;
+  margin-left: -280px;*/
+  outline: medium none;
+  position: fixed;
+  /*top: 10%;
+  width: 560px;*/
+  z-index: 1050;
+}
+.ui-dialog .ui-dialog-titlebar { /*padding: .4em 1em;*/
+  position: relative;
+  padding:5px 15px;
+  border:0px 0px 0px 1px solid;
+  border-color: white;
+  padding: 5px 15px;
+  font-size: 18px;
+  text-decoration:none;
+  background:none;
+  -moz-border-radius-bottomright: 0px;
+  -webkit-border-bottom-right-radius: 0px;
+  -khtml-border-bottom-right-radius: 0px;
+
+  -moz-border-radius-bottomleft: 0px;
+  -webkit-border-bottom-left-radius: 0px;
+  -khtml-border-bottom-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+  border-bottom:1px solid #ccc;
+}
+.ui-dialog .ui-dialog-title {
+  float: left;
+  color:#404040;
+  font-weight:bold;
+  margin-top:5px;
+  margin-bottom:5px;
+  padding:5px;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+.ui-dialog .ui-dialog-titlebar-close {
+  position: absolute;
+  right: .3em;
+  top: 50%;
+  width: 19px;
+  margin: -20px 0 0 0;
+  padding: 1px;
+  height: 18px;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 13.5px;
+  text-shadow: 0 1px 0 #ffffff;
+  filter: alpha(opacity=25);
+  -khtml-opacity: 0.25;
+  -moz-opacity: 0.25;
+  opacity: 0.25;
+  background:none;
+  border-width: 0;
+  border:none;
+  box-shadow: none;
+}
+
+.ui-dialog .ui-dialog-titlebar-close span { 
+  display: block; 
+  margin: 1px;
+  text-indent: 9999px;
+}
+
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 1px;   filter: alpha(opacity=90);
+  -khtml-opacity: 0.90;
+  -moz-opacity: 0.90;
+  opacity: 0.90;   
+}
+
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+
+.ui-dialog .ui-dialog-buttonpane {
+  text-align: left;
+  border-width: 1px 0 0 0;
+  background-image: none;
+  margin: .5em 0 0 0;
+  background-color: #f5f5f5;
+  padding: 5px 15px 5px;
+  border-top: 1px solid #ddd;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+  -moz-box-shadow: inset 0 1px 0 #ffffff;
+  box-shadow: inset 0 1px 0 #ffffff;
+  zoom: 1;
+  margin-bottom: 0;
+
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+
+.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button{
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0;
+
+  color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+
+}
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
+
+/*
+ * jQuery UI Tabs 1.9.2
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/tabs/
+ */
+ .ui-tabs .ui-tabs-nav{ background:none; border-color: #ddd;border-style: solid;border-width: 0 0 1px;}
+.ui-tabs { position: relative; padding: .2em; zoom: 1; border:0px;} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+
+
+.ui-tabs .ui-tabs-nav li:hover, .ui-tabs .ui-tabs-nav li a:hover{
+  background:whiteSmoke;
+  border-bottom:1px solid #ddd;
+  padding-bottom:0px;
+   color:#00438A;
+}
+
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; border-bottom:1px solid #DDD; }
+.ui-tabs .ui-tabs-nav li {  text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px; }
+
+.ui-tabs-nav .ui-state-default{
+  -webkit-box-shadow: 0px 0px 0px #ffffff; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
+     -moz-box-shadow: 0px 0px 0px #ffffff; /* FF3.5 - 3.6 */
+          box-shadow: 0px 0px 0px #ffffff; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
+}
+.ui-tabs .ui-tabs-nav li a {
+  float: left;
+  text-decoration: none;
+  cursor: text;
+  padding: 0 15px;
+  margin-right: 2px;
+  line-height: 34px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+
+
+ }
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; padding-bottom: 0px; outline:none;}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active , .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: #ffffff;
+  cursor: default;
+  color:gray;
+  outline:none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a{background-color: #ffffff;outline:none;border:none;}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active:hover{
+  background:#ffffff;
+  outline:none;
+  margin-bottom:0px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
+/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs-panel .ui-button{text-decoration:none;}
+.ui-tabs .ui-tabs-hide { display: none !important; }
+
+
+/* IE fix for background inheritance from ui-widget*/
+.ui-tabs .ui-tabs-nav li{
+  filter:none;
+}
+
+/*
+ * jQuery UI Tooltip 1.9.0
+ *
+ * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/tooltip/
+ */
+.ui-tooltip {
+    padding:8px;
+    position:absolute;
+    z-index:9999;
+    max-width: 300px;
+    -o-box-shadow: 0 0 5px #ddd;
+    -moz-box-shadow: 0 0 5px #ddd;
+    -webkit-box-shadow: 0 0 5px #ddd;
+    /*box-shadow: 0 2px 5px #ddd;*/
+    box-shadow: inset 0 1px 0 #ffffff;
+}
+
+body .ui-tooltip { border-width:2px; }
+
+/*
+ * jQuery UI Datepicker 1.9.0
+ *
+ * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://jqueryui.com/datepicker/
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px; font-weight: bold; width: 100%; padding: 4px 0; background-color: #f5f5f5; color: #808080; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { /*top: 1px;*/ }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+
+.ui-datepicker .ui-datepicker-prev-hover { /*left:1px;*/ }
+.ui-datepicker .ui-datepicker-next-hover { /*right:1px;*/ }
+
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+  display: none; /*sorry for IE5*/
+  display/**/: block; /*sorry for IE5*/
+  position: absolute; /*must have*/
+  z-index: -1; /*must have*/
+  filter: mask(); /*must have*/
+  top: -4px; /*must have*/
+  left: -4px; /*must have*/
+  width: 200px; /*must have*/
+  height: 200px; /*must have*/
+}
+
+.ui-datepicker th{
+  font-weight: bold;
+  color: gray;
+}
+
+.ui-datepicker-today a:hover{
+  background-color: #808080;
+  color: #ffffff;
+
+}
+.ui-datepicker-today a{
+  background-color: #BFBFBF;
+  cursor: pointer;
+  padding: 0 4px;
+  margin-bottom:0px;
+
+}
+
+
+.ui-datepicker td a{
+  margin-bottom:0px;
+  border:0px;
+}
+
+.ui-datepicker td:hover{
+    color: #ffffff;
+}
+
+.ui-datepicker td .ui-state-default {
+  border:0px;
+  background:none;
+  margin-bottom:0px;
+  padding:5px;
+  color:gray;
+  text-align: center;
+  filter:none;
+}
+
+
+.ui-datepicker td .ui-state-active{
+  background:#BFBFBF;
+  margin-bottom:0px;
+  font-size:normal;
+  text-shadow: 0px;
+  color: #ffffff;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.ui-datepicker td .ui-state-hover {
+    color: #ffffff;
+    background: #0064cd;
+    background-color: #0064cd;
+    background-repeat: repeat-x;
+    background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+    background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+    background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+    background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+    background-image: linear-gradient(top, #049cdb, #0064cd);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    border-color: #0064cd #0064cd #003f81;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    -khtml-border-radius: 4px;
+    border-radius: 4px;
+}
+
+/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%;
+
+/*this can be removed if ui-widget-header is blue*/
+    color: #ffffff;
+  background-color: #0064cd;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
+  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
+  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
+  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
+  background-image: linear-gradient(top, #049cdb, #0064cd);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-color: #0064cd #0064cd #003f81;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ }
+
+
+
+/*** Input field styling from Bootstrap **/
+ input, textarea {
+  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+  -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+  transition: border linear 0.2s, box-shadow linear 0.2s;
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+input:focus, textarea:focus {
+  outline: 0;
+  border-color: rgba(82, 168, 236, 0.8);
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+input[type=file]:focus, input[type=checkbox]:focus, select:focus {
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+  outline: 1px dotted #666;
+}
+
+input[type="text"],
+input[type="password"],
+.ui-autocomplete-input,
+textarea,
+.uneditable-input {
+  display: inline-block;
+  padding: 4px;
+  font-size: 13px;
+  line-height: 18px;
+  color: #808080;
+  border: 1px solid #ccc;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+
+
+
+/**Toolbar**/
+
+.ui-toolbar{
+  padding: 7px 14px;
+  margin: 0 0 18px;
+  background-color: #f5f5f5;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
+  background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
+  background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+  background-image: linear-gradient(top, #ffffff, #f5f5f5);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+  border: 1px solid #ddd;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+  -moz-box-shadow: inset 0 1px 0 #ffffff;
+  box-shadow: inset 0 1px 0 #ffffff;
+}
+
+
+/***Dialog fixes**/
+
+.ui-dialog-buttonset .ui-button:nth-child(2){
+  cursor: pointer;
+  display: inline-block;
+  background-color: #e6e6e6;
+  background-repeat: no-repeat;
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+  padding: 5px 14px 6px;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  color: #333;
+  font-size: 13px;
+  line-height: normal;
+  border: 1px solid #ccc;
+  border-bottom-color: #bbb;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-transition: 0.1s linear all;
+  -moz-transition: 0.1s linear all;
+  -ms-transition: 0.1s linear all;
+  -o-transition: 0.1s linear all;
+  transition: 0.1s linear all;
+   overflow: visible;
+}
+
+
+
+/***Wijmo Theming**/
+
+div.wijmo-wijmenu{
+  padding:0 20px;
+  background-color: #222;
+  background-color: #222222;
+  background-repeat: repeat-x;
+  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+
+.wijmo-wijmenu .ui-state-default{
+  box-shadow: none;
+  color:#BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-default .wijmo-wijmenu-text{    
+  color:#BFBFBF;
+}
+
+.wijmo-wijmenu .ui-state-hover{
+  background: #444;
+  background: rgba(255, 255, 255, 0.05);
+}
+
+.wijmo-wijmenu .ui-state-hover .wijmo-wijmenu-text{
+  color:#ffffff;
+}
+
+div.wijmo-wijmenu .ui-widget-header h3{
+  position: relative;
+  margin-top:1px;
+  padding:0;
+}
+
+.wijmo-wijmenu h3 a{
+  color: #FFFFFF;
+  display: block;
+  float: left;
+  font-size: 20px;
+  font-weight: 200;
+  line-height: 1;
+  margin-left: -20px;
+  margin-top:1px;
+  padding: 8px 20px 12px;
+}
+
+.wijmo-wijmenu h3 a:hover{
+  background-color: rgba(255, 255, 255, 0.05);
+  color: #FFFFFF;
+  text-decoration: none;
+}
+
+.wijmo-wijmenu .ui-widget-header{
+  border:0px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child{
+  padding: 0.3em 0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child{
+  background: #333;
+  border:0;
+  margin:0;
+  padding: 6px 0;
+  width:160px;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-item{
+  margin:0;
+  border:0;
+}
+
+.wijmo-wijmenu a.wijmo-wijmenu-link{
+  margin:0;
+  line-height: 19px;
+  padding: 10px 10px 11px;
+  border:0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius:0;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-link{
+  display:block;
+  float:none;
+  padding: 4px 15px;
+  width:auto;
+}
+
+div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-text
+{
+  float:none;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child .ui-state-hover {
+  background: #191919;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-separator{
+  padding: 5px 0;
+  background-image: none;
+  background-color: #222;
+  border-top: 1px solid #444;
+  border-bottom:0;
+  border-left:0;
+  border-right:0;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input {
+  -moz-transition: none 0s ease 0s;
+  background-color: rgba(255, 255, 255, 0.3);
+  border: 1px solid #111111;
+  border-radius: 4px 4px 4px 4px;
+  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
+  color: rgba(255, 255, 255, 0.75);
+  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+  line-height: 1;
+  margin: 5px 10px 0 10px;
+  padding: 4px 9px;
+  width:100px;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:hover {
+  background-color: rgba(255, 255, 255, 0.5);
+  color: #FFFFFF;
+}
+
+.wijmo-wijmenu .wijmo-wijmenu-item input:focus {
+  background-color: #FFFFFF;
+  border: 0 none;
+  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+  color: #404040;
+  outline: 0 none;
+  padding: 5px 10px;
+  text-shadow: 0 1px 0 #FFFFFF;
+}
+
+
+.wijmo-wijmenu .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+  text-shadow:none;
+}
+
+
+.wijmo-wijmenu .ui-state-default{
+  box-shadow: none;
+  color:#BFBFBF;
+  filter: none;
+}
+
diff --git a/third-party/jquery-ui-slider-1.10.3/js/jquery-ui-1.10.3.slider.min.js b/third-party/jquery-ui-slider-1.10.3/js/jquery-ui-1.10.3.slider.min.js
new file mode 100755 (executable)
index 0000000..b2ea00e
--- /dev/null
@@ -0,0 +1,6 @@
+/*! jQuery UI - v1.10.3 - 2013-11-26
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.slider.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,n=s.name,t.href&&n&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,a){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),a&&a.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var a,s,n=e(this[0]);n.length&&n[0]!==document;){if(a=n.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,a){return!!e.data(t,a[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var a=e.attr(t,"tabindex"),s=isNaN(a);return(s||a>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,a){function s(t,i,a,s){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,a&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===a?["Left","Right"]:["Top","Bottom"],r=a.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+a]=function(i){return i===t?o["inner"+a].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+a]=function(t,i){return"number"!=typeof t?o["outer"+a].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,a){var s,n=e.ui[t].prototype;for(s in a)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,a[s]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;s.length>a;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var a=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[a]>0?!0:(t[a]=1,s=t[a]>0,t[a]=0,s)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],n=u+"-"+i,a||(a=s,s=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(i,a){return e.isFunction(a)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,n=this._superApply;return this._super=e,this._superApply=t,i=a.apply(this,arguments),this._super=s,this._superApply=n,i}}(),t):(l[i]=a,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&"_"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var a,n,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},a=i.split("."),i=a.shift(),a.length){for(n=o[i]=e.widget.extend({},this.options[i]),r=0;a.length-1>r;r++)n[a[r]]=n[a[r]]||{},n=n[a[r]];if(i=a.pop(),s===t)return n[i]===t?null:n[i];n[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,a){var n,r=this;"boolean"!=typeof i&&(a=s,s=i,i=!1),a?(s=n=e(s),this.bindings=this.bindings.add(s)):(a=s,s=this.element,n=this.widget()),e.each(a,function(a,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=a.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?n.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var r,o=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),r=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),r&&e.effects&&e.effects.effect[o]?s[t](a):o!==t&&s[o]?s[o](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,a=1===i.which,n="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return a&&!n&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),n="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=s.values&&s.values.length||1,a.length>i&&(a.slice(i).remove(),a=a.slice(0,i)),t=a.length;i>t;t++)r.push(n);this.handles=a.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):this.range=e([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,a,n,r,o,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(a>i||a===i&&(t===u._lastChangedValue||u.values(t)===c.min))&&(a=i,n=e(this),r=t)}),o=this._start(t,r),o===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,n.addClass("ui-state-active").focus(),h=n.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-n.width()/2,top:t.pageY-h.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,a,n;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),a=this._valueMax()-this._valueMin(),n=this._valueMin()+s*a,this._trimAlignValue(n)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,a,n;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(a=this.values(),a[t]=i,n=this._trigger("slide",e,{handle:this.handles[t],value:i,values:a}),s=this.values(t?0:1),n!==!1&&this.values(t,i,!0))):i!==this.value()&&(n=this._trigger("slide",e,{handle:this.handles[t],value:i}),n!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var s,a,n;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,a=arguments[0],n=0;s.length>n;n+=1)s[n]=this._trimAlignValue(a[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,i){var s,a=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(a=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;a>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,a,n,r=this.options.range,o=this.options,h=this,l=this._animateOff?!1:o.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,o.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i}):(s=this.value(),a=this._valueMin(),n=this._valueMax(),i=n!==a?100*((s-a)/(n-a)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,o.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},o.animate),"max"===r&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:o.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},o.animate),"max"===r&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:o.animate}))},_handleEvents:{keydown:function(i){var s,a,n,r,o=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),s=this._start(i,o),s===!1))return}switch(r=this.options.step,a=n=this.options.values&&this.options.values.length?this.values(o):this.value(),i.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(a+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(a-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(a===this._valueMax())return;n=this._trimAlignValue(a+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(a===this._valueMin())return;n=this._trimAlignValue(a-r)}this._slide(i,o,n)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}})})(jQuery);
\ No newline at end of file
diff --git a/ui/templates/base2.html b/ui/templates/base2.html
new file mode 100644 (file)
index 0000000..499ed88
--- /dev/null
@@ -0,0 +1,38 @@
+{# This is required by insert_above #}{% insert_handler %}<!DOCTYPE html>
+<html lang="en"><head>
+<title>FIBRE - {{ section }}</title>
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="shortcut icon" href="/static/img/myslice-icon.png">
+{# This is where insert_str will end up #}{% media_container prelude %}
+{% include 'messages-transient-header.html' %}
+<script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
+<script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+<script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
+<script src="{{ STATIC_URL }}js/myslice-ui.js"></script>
+<style type="text/css">{# In case we need to add raw css code #}{% container prelude_css %}</style>
+{{ header_prelude }}
+{% block head %} {% endblock head %}
+{# let's add these ones no matter what #}
+{% insert_str prelude "js/jquery.min.js" %}
+{% insert_str prelude "js/jquery.html5storage.min.js" %}
+{% insert_str prelude "js/messages-runtime.js" %}
+{% insert_str prelude "js/class.js" %}
+{% insert_str prelude "js/plugin-helper.js" %}
+{% insert_str prelude "js/mustache.js" %}
+{% insert_str prelude "js/plugin.js" %}
+{% insert_str prelude "js/manifold.js" %}
+{% insert_str prelude "css/manifold.css" %}
+{% insert_str prelude "css/plugin.css" %}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
+</head>
+<body>
+{% block container %}
+       {% block topmenu %}
+       {% include theme|add:"__widget-topmenu.html" %}
+       {% endblock topmenu %}
+       {% include 'messages-transient.html' %}
+       {% block base_content %}
+       {% endblock %}
+{% endblock container %}
+</body>
+</html>
diff --git a/unfold.sqlite3-110314 b/unfold.sqlite3-110314
new file mode 100644 (file)
index 0000000..b3018f1
Binary files /dev/null and b/unfold.sqlite3-110314 differ
diff --git a/unfold.sqlite3-130314 b/unfold.sqlite3-130314
new file mode 100644 (file)
index 0000000..0ccc69e
Binary files /dev/null and b/unfold.sqlite3-130314 differ
diff --git a/unfold.sqlite3-140314 b/unfold.sqlite3-140314
new file mode 100644 (file)
index 0000000..4e36199
Binary files /dev/null and b/unfold.sqlite3-140314 differ
diff --git a/unfold.sqlite3.old-120314 b/unfold.sqlite3.old-120314
new file mode 100644 (file)
index 0000000..815d818
Binary files /dev/null and b/unfold.sqlite3.old-120314 differ