diff --git a/README.md b/README.md index 290cbbc..6fd9ff4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,16 @@ -![# BOSWatch](/www/gfx/logo.png) +**Codacy - static code analysis:** + +|branch|quality| +|---|---| +|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)| +|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)| + +**Achtung:** Die readme ist veraltet - Neue Informationen werden im Laufe der Zeit in das Github Wiki integriert! + +**Attention:** This readme is outdated - New informations will be integrated in the Github Wiki! + + +![# BOSWatch](/boswatch.png) :satellite: Python Script to receive and decode German BOS Information with rtl_fm and multimon-NG :satellite: @@ -24,6 +36,8 @@ unless you are developer you can use the develop-Branch - may be unstable! - Logfiles for better troubleshooting - verbose/quiet mode for more/none information - Ready for use BOSWatch as daemon +- possibility to start plugins asynchron +- NMA Error Handler ##### Features for the future: - more plugins @@ -43,6 +57,7 @@ If you want to code your own Plugin, see `plugins/README.md`. |BosMon|send data to BosMon server|:white_check_mark:|:white_check_mark:|:white_check_mark:| |firEmergency|send data to firEmergency server|:x:|:white_check_mark:|:white_check_mark:| |jsonSocket|send data as jsonString to a socket server|:white_check_mark:|:white_check_mark:|:white_check_mark:| +|NMA|send data to Notify my Android|:white_check_mark:|:white_check_mark:|:white_check_mark:| - for more Information to the plugins see `config.ini` @@ -68,7 +83,7 @@ No filter for a combination typ/plugin = all data will pass Syntax: `INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX` (separator `;`) - `TYP` = the data typ (FMS|ZVEI|POC) -- `DATAFIELD` = the field of the data array (See interface.txt) +- `DATAFIELD` = the field of the data array (see readme.md in plugin folder) - `PLUGIN` = the name of the plugin to call with this filter (* for all) - `FREQUENZ` = the frequenz to use the filter (for more SDR sticks (* for all)) - `REGEX` = the RegEX @@ -80,7 +95,7 @@ only POCSAG to MySQL with the text "ALARM:" in the message `pocTest = POC;msg;MySQL;*;ALARM:` ##### Web frontend (obsolete) -New version in future - old data in folder `/www/` +old data in folder `/exampeAddOns/simpleWeb/` ~~Put the files in folder /wwww/ into your local webserver folder (f.e. /var/www/). Now you must edit the "config.php" with your userdata to your local database. @@ -145,4 +160,3 @@ Thanks to smith_fms and McBo from Funkmeldesystem.de - Forum for Inspiration and ### Code your own Plugin See `plugins/README.md` - diff --git a/www/gfx/logo.png b/boswatch.png similarity index 100% rename from www/gfx/logo.png rename to boswatch.png diff --git a/boswatch.py b/boswatch.py index 9e63beb..071028e 100755 --- a/boswatch.py +++ b/boswatch.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# -*- coding: cp1252 -*- +# -*- coding: UTF-8 -*- # """ BOSWatch @@ -24,11 +24,12 @@ import os # for log mkdir import time # for time.sleep() import subprocess # for starting rtl_fm and multimon-ng -from includes import globals # Global variables +from includes import globalVars # Global variables from includes import MyTimedRotatingFileHandler # extension of TimedRotatingFileHandler -from includes import converter # converter functions from includes import signalHandler # TERM-Handler for use script as a daemon from includes import checkSubprocesses # check startup of the subprocesses +from includes.helper import configHandler +from includes.helper import freqConverter # @@ -42,10 +43,11 @@ try: epilog="More options you can find in the extern config.ini file in the folder /config") # parser.add_argument("-c", "--channel", help="BOS Channel you want to listen") parser.add_argument("-f", "--freq", help="Frequency you want to listen", required=True) - parser.add_argument("-d", "--device", help="Device you want to use (Check with rtl_test)", type=int, default=0) + parser.add_argument("-d", "--device", help="Device you want to use (Check with rtl_test)", required=True) parser.add_argument("-e", "--error", help="Frequency-Error of your device in PPM", type=int, default=0) parser.add_argument("-a", "--demod", help="Demodulation functions", choices=['FMS', 'ZVEI', 'POC512', 'POC1200', 'POC2400'], required=True, nargs="+") parser.add_argument("-s", "--squelch", help="Level of squelch", type=int, default=0) + parser.add_argument("-g", "--gain", help="Level of gain", type=int, default=100) parser.add_argument("-u", "--usevarlog", help="Use '/var/log/boswatch' for logfiles instead of subdir 'log' in BOSWatch directory", action="store_true") parser.add_argument("-v", "--verbose", help="Shows more information", action="store_true") parser.add_argument("-q", "--quiet", help="Shows no information. Only logfiles", action="store_true") @@ -68,26 +70,27 @@ try: # initialization: rtl_fm = None multimon_ng = None + nmaHandler = None try: # # Script-pathes # - globals.script_path = os.path.dirname(os.path.abspath(__file__)) + globalVars.script_path = os.path.dirname(os.path.abspath(__file__)) # # Set log_path # if args.usevarlog: - globals.log_path = "/var/log/BOSWatch/" + globalVars.log_path = "/var/log/BOSWatch/" else: - globals.log_path = globals.script_path+"/log/" + globalVars.log_path = globalVars.script_path+"/log/" # # If necessary create log-path # - if not os.path.exists(globals.log_path): - os.mkdir(globals.log_path) + if not os.path.exists(globalVars.log_path): + os.mkdir(globalVars.log_path) except: # we couldn't work without logging -> exit print "ERROR: cannot initialize paths" @@ -103,7 +106,7 @@ try: #formatter = logging.Formatter('%(asctime)s - %(module)-15s %(funcName)-15s [%(levelname)-8s] %(message)s', '%d.%m.%Y %H:%M:%S') formatter = logging.Formatter('%(asctime)s - %(module)-15s [%(levelname)-8s] %(message)s', '%d.%m.%Y %H:%M:%S') # create a file logger - fh = MyTimedRotatingFileHandler.MyTimedRotatingFileHandler(globals.log_path+"boswatch.log", "midnight", interval=1, backupCount=999) + fh = MyTimedRotatingFileHandler.MyTimedRotatingFileHandler(globalVars.log_path+"boswatch.log", "midnight", interval=1, backupCount=999) # Starts with log level >= Debug # will be changed with config.ini-param later fh.setLevel(logging.DEBUG) @@ -132,12 +135,15 @@ try: # Clear the logfiles # fh.doRollover() - rtl_log = open(globals.log_path+"rtl_fm.log", "w") - mon_log = open(globals.log_path+"multimon.log", "w") + rtl_log = open(globalVars.log_path+"rtl_fm.log", "w") + mon_log = open(globalVars.log_path+"multimon.log", "w") + rawMmOut = open(globalVars.log_path+"mm_raw.txt", "w") rtl_log.write("") mon_log.write("") + rawMmOut.write("") rtl_log.close() mon_log.close() + rawMmOut.close() logging.debug("BOSWatch has started") logging.debug("Logfiles cleared") @@ -145,22 +151,22 @@ try: # It's an error, but we could work without that stuff... logging.error("cannot clear Logfiles") logging.debug("cannot clear Logfiles", exc_info=True) - pass # # For debug display/log args # try: - logging.debug("SW Version: %s",globals.getVers("vers")) - logging.debug("Build Date: %s",globals.getVers("date")) + logging.debug("SW Version: %s",globalVars.versionNr) + logging.debug("Build Date: %s",globalVars.buildDate) logging.debug("BOSWatch given arguments") if args.test: logging.debug(" - Test-Mode!") - logging.debug(" - Frequency: %s", converter.freqToHz(args.freq)) + logging.debug(" - Frequency: %s", freqConverter.freqToHz(args.freq)) logging.debug(" - Device: %s", args.device) logging.debug(" - PPM Error: %s", args.error) logging.debug(" - Squelch: %s", args.squelch) + logging.debug(" - Gain: %s", args.gain) demodulation = "" if "FMS" in args.demod: @@ -201,42 +207,59 @@ try: # try: logging.debug("reading config file") - globals.config = ConfigParser.ConfigParser() - globals.config.read(globals.script_path+"/config/config.ini") + globalVars.config = ConfigParser.ConfigParser() + globalVars.config.read(globalVars.script_path+"/config/config.ini") # if given loglevel is debug: - if globals.config.getint("BOSWatch","loglevel") == 10: - logging.debug(" - BOSWatch:") - for key,val in globals.config.items("BOSWatch"): - logging.debug(" -- %s = %s", key, val) - logging.debug(" - FMS:") - for key,val in globals.config.items("FMS"): - logging.debug(" -- %s = %s", key, val) - logging.debug(" - ZVEI:") - for key,val in globals.config.items("ZVEI"): - logging.debug(" -- %s = %s", key, val) - logging.debug(" - POC:") - for key,val in globals.config.items("POC"): - logging.debug(" -- %s = %s", key, val) + if globalVars.config.getint("BOSWatch","loglevel") == 10: + configHandler.checkConfig("BOSWatch") + configHandler.checkConfig("FMS") + configHandler.checkConfig("ZVEI") + configHandler.checkConfig("POC") except: # we couldn't work without config -> exit logging.critical("cannot read config file") logging.debug("cannot read config file", exc_info=True) exit(1) - # initialization was fine, continue with main program... + + # + # Set the loglevel and backupCount of the file handler + # try: - # - # Set the loglevel and backupCount of the file handler - # - logging.debug("set loglevel of fileHandler to: %s",globals.config.getint("BOSWatch","loglevel")) - fh.setLevel(globals.config.getint("BOSWatch","loglevel")) - logging.debug("set backupCount of fileHandler to: %s", globals.config.getint("BOSWatch","backupCount")) - fh.setBackupCount(globals.config.getint("BOSWatch","backupCount")) + logging.debug("set loglevel of fileHandler to: %s",globalVars.config.getint("BOSWatch","loglevel")) + fh.setLevel(globalVars.config.getint("BOSWatch","loglevel")) + logging.debug("set backupCount of fileHandler to: %s", globalVars.config.getint("BOSWatch","backupCount")) + fh.setBackupCount(globalVars.config.getint("BOSWatch","backupCount")) except: # It's an error, but we could work without that stuff... logging.error("cannot set loglevel of fileHandler") logging.debug("cannot set loglevel of fileHandler", exc_info=True) - pass + + + # + # Add NMA logging handler + # + try: + if configHandler.checkConfig("NMAHandler"): + # is NMAHandler enabled? + if globalVars.config.getboolean("NMAHandler", "enableHandler") == True: + # we only could do something, if an APIKey is given: + if len(globalVars.config.get("NMAHandler","APIKey")) > 0: + logging.debug("add NMA logging handler") + from includes import NMAHandler + if globalVars.config.get("NMAHandler","appName") == "": + nmaHandler = NMAHandler.NMAHandler(globalVars.config.get("NMAHandler","APIKey")) + else: + nmaHandler = NMAHandler.NMAHandler(globalVars.config.get("NMAHandler","APIKey"), globalVars.config.get("NMAHandler","appName")) + nmaHandler.setLevel(globalVars.config.getint("NMAHandler","loglevel")) + myLogger.addHandler(nmaHandler) + except: + # It's an error, but we could work without that stuff... + logging.error("cannot add NMA logging handler") + logging.debug("cannot add NMA logging handler", exc_info=True) + + + # initialization was fine, continue with main program... # # Load plugins @@ -254,27 +277,25 @@ try: # Load filters # try: - if globals.config.getboolean("BOSWatch","useRegExFilter"): - from includes import filter - filter.loadFilters() + if globalVars.config.getboolean("BOSWatch","useRegExFilter"): + from includes import regexFilter + regexFilter.loadFilters() except: # It's an error, but we could work without that stuff... logging.error("cannot load filters") logging.debug("cannot load filters", exc_info=True) - pass # # Load description lists # try: - if globals.config.getboolean("FMS","idDescribed") or globals.config.getboolean("ZVEI","idDescribed") or globals.config.getboolean("POC","idDescribed"): + if globalVars.config.getboolean("FMS","idDescribed") or globalVars.config.getboolean("ZVEI","idDescribed") or globalVars.config.getboolean("POC","idDescribed"): from includes import descriptionList descriptionList.loadDescriptionLists() except: # It's an error, but we could work without that stuff... logging.error("cannot load description lists") logging.debug("cannot load description lists", exc_info=True) - pass # # Start rtl_fm @@ -283,13 +304,13 @@ try: if not args.test: logging.debug("starting rtl_fm") command = "" - if globals.config.has_option("BOSWatch","rtl_path"): - command = globals.config.get("BOSWatch","rtl_path") - command = command+"rtl_fm -d "+str(args.device)+" -f "+str(converter.freqToHz(args.freq))+" -M fm -s 22050 -p "+str(args.error)+" -E DC -F 0 -l "+str(args.squelch)+" -g 100" + if globalVars.config.has_option("BOSWatch","rtl_path"): + command = globalVars.config.get("BOSWatch","rtl_path") + command = command+"rtl_fm -d "+str(args.device)+" -f "+str(freqConverter.freqToHz(args.freq))+" -M fm -p "+str(args.error)+" -E DC -F 0 -l "+str(args.squelch)+" -g "+str(args.gain)+" -s 22050" rtl_fm = subprocess.Popen(command.split(), #stdin=rtl_fm.stdout, stdout=subprocess.PIPE, - stderr=open(globals.log_path+"rtl_fm.log","a"), + stderr=open(globalVars.log_path+"rtl_fm.log","a"), shell=False) # rtl_fm doesn't self-destruct, when an error occurs # wait a moment to give the subprocess a chance to write the logfile @@ -310,13 +331,13 @@ try: if not args.test: logging.debug("starting multimon-ng") command = "" - if globals.config.has_option("BOSWatch","multimon_path"): - command = globals.config.get("BOSWatch","multimon_path") + if globalVars.config.has_option("BOSWatch","multimon_path"): + command = globalVars.config.get("BOSWatch","multimon_path") command = command+"multimon-ng "+str(demodulation)+" -f alpha -t raw /dev/stdin - " multimon_ng = subprocess.Popen(command.split(), stdin=rtl_fm.stdout, stdout=subprocess.PIPE, - stderr=open(globals.log_path+"multimon.log","a"), + stderr=open(globalVars.log_path+"multimon.log","a"), shell=False) # multimon-ng doesn't self-destruct, when an error occurs # wait a moment to give the subprocess a chance to write the logfile @@ -338,16 +359,25 @@ try: while True: decoded = str(multimon_ng.stdout.readline()) #Get line data from multimon stdout from includes import decoder - decoder.decode(converter.freqToHz(args.freq), decoded) + decoder.decode(freqConverter.freqToHz(args.freq), decoded) + # write multimon-ng raw data + if globalVars.config.getboolean("BOSWatch","writeMultimonRaw"): + try: + rawMmOut = open(globalVars.log_path+"mm_raw.txt", "a") + rawMmOut.write(decoded) + except: + logging.warning("cannot write raw multimon data") + finally: + rawMmOut.close() else: logging.debug("start testing") - testFile = open(globals.script_path+"/testdata/testdata.txt","r") + testFile = open(globalVars.script_path+"/testdata/testdata.txt","r") for testData in testFile: if (len(testData.rstrip(' \t\n\r')) > 1) and ("#" not in testData[0]): logging.info("Testdata: %s", testData.rstrip(' \t\n\r')) from includes import decoder - decoder.decode(converter.freqToHz(args.freq), testData) + decoder.decode(freqConverter.freqToHz(args.freq), testData) time.sleep(1) logging.debug("test finished") @@ -381,7 +411,13 @@ finally: finally: # Close Logging logging.debug("close Logging") + # Waiting for all Threads to write there logs + if globalVars.config.getboolean("BOSWatch","processAlarmAsync") == True: + logging.debug("waiting 3s for threads...") + time.sleep(3) logging.info("BOSWatch exit()") logging.shutdown() + if nmaHandler: + nmaHandler.close() fh.close() ch.close() diff --git a/config/config.template.ini b/config/config.template.ini index 69efe4c..33a7de9 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -23,6 +23,12 @@ backupCount = 7 #rtl_path = /usr/local/bin/ #multimon_path = /usr/local/bin/ +# if you are using many Plugins or Plugins with a long execution time +# you could execute them in an asynchronous manner +# It must be pointed out that enabling (0|1) this consume time, +# so don't use it for one rapid Plugin +processAlarmAsync = 0 + # Using RegEx-Filter (0 - off | 1 - on) # Filter-configuration in section [Filters] useRegExFilter = 0 @@ -42,14 +48,35 @@ doubleFilter_ignore_time = 5 # you will get more then one alarm anyway if the msg is different (receiving-problems) doubleFilter_check_msg = 0 +# writes the multimon-ng raw data stream into a text file named mm_raw.txt +writeMultimonRaw = 1 + +[NMAHandler] +# you could use an logging handler for sending logging records to NotifyMyAndroid +# enableHandler (0|1) will enable the NMA handler +enableHandler = 0 + +# loglevel for NMAHandler (see BOSWatch loglevel description) +loglevel = 50 + +# logging record will send to APIKey +APIKey = + +# You could change the name of the application (default: BOSWatch) +# (f.e. if you use more than one instance of BOSWatch) +appName = BOSWatch + + [FMS] # look-up-table for adding a description # Using Description (0 - off | 1 - on) +# descriptions loaded from csv/fms.csv idDescribed = 0 [ZVEI] # look-up-table for adding a description # Using Description (0 - off | 1 - on) +# descriptions loaded from csv/zvei.csv idDescribed = 0 [POC] @@ -68,8 +95,14 @@ filter_range_end = 9999999 # look-up-table for adding a description # Using Description (0 - off | 1 - on) +# descriptions loaded from csv/poc.csv idDescribed = 0 +# Static Massages for Subrics. +rica = Feuer +ricb = TH +ricc = AGT +ricd = Unwetter [Filters] # RegEX Filter Configuration @@ -77,7 +110,7 @@ idDescribed = 0 # No Filter for a Typ/Plugin Combination = all Data pass # INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX # TYP = the Data Typ (FMS|ZVEI|POC) -# DATAFIELD = the field of the Data Array (See interface.txt) +# DATAFIELD = the field of the Data Array (see readme.md in plugin folder) # PLUGIN = the name of the Plugin to call with this Filter (* for all) # FREQUENZ = the Frequenz to use the Filter (for more SDR Sticks (* for all)) # REGEX = the RegEX @@ -97,6 +130,12 @@ eMail = 0 BosMon = 0 firEmergency = 0 jsonSocket = 0 +notifyMyAndroid = 0 +SMS = 0 +Sms77 = 0 +FFAgent = 0 +Pushover = 0 +Telegram = 0 # for developing template-module template = 0 @@ -105,7 +144,7 @@ template = 0 [MySQL] # MySQL configuration dbserver = localhost -dbuser = root +dbuser = boswatch dbpassword = root database = boswatch @@ -113,10 +152,15 @@ database = boswatch tableFMS = bos_fms tableZVEI = bos_zvei tablePOC = bos_pocsag +tableSIG = bos_signal + +# Signal RICs (empty: none set, separator ",") +# f.e.: signal_ric = 1234566,1234567,1234568 +signal_ric = ## SIGNAL-RICS ## [httpRequest] -# URL without http:// +# example URL http://example.com/remote.php?DESCR=%DESCR% # you can use the following wildcards in your URL as GET params: # http://en.wikipedia.org/wiki/Query_string @@ -129,25 +173,26 @@ tablePOC = bos_pocsag # %DESCR% = Description from csv-file # %TIME% = Time (by script) # %DATE% = Date (by script) -#fms_url = www.google.de?code=%FMS%&stat=%STATUS% +#fms_url = http://www.google.de?code=%FMS%&stat=%STATUS% fms_url = # %ZVEI% = ZVEI 5-tone Code # %DESCR% = Description from csv-file # %TIME% = Time (by script) # %DATE% = Date (by script) -#zvei_url = www.google.de?zvei=%ZVEI% +#zvei_url = http://www.google.de?zvei=%ZVEI% zvei_url = # %RIC% = Pocsag RIC # %FUNC% = Pocsac function/Subric (1-4) # %FUNCCHAR% = Pocsac function/Subric als character (a-d) +# %FUNCTEXT% = Pocsac function/Subric static massage definded in pocsag section # %MSG% = Message of the Pocsag telegram # %BITRATE% = Bitrate of the Pocsag telegram # %DESCR% = Description from csv-file # %TIME% = Time (by script) # %DATE% = Date (by script) -#poc_url = www.google.de?ric=%RIC%&subric=%FUNC%&msg=%MSG% +#poc_url = http://www.google.de?ric=%RIC%&subric=%FUNC%&msg=%MSG% poc_url = @@ -171,34 +216,44 @@ to = user@irgendwo, user2@woanders # normal|urgent|non-urgent priority = urgent -# %FMS% = FMS Code -# %STATUS% = FMS Status -# %DIR% = Direction of the telegram (0/1) -# %DIRT% = Direction of the telegram (Text-String) -# %TSI% = Tactical Short Information (I-IV) -# %DESCR% = Description from csv-file -# %TIME% = Time (by script) -# %DATE% = Date (by script) +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) fms_subject = FMS: %FMS% -fms_message = %DATE% %TIME%: %FMS% - Status: %STATUS% - Direction: %DIRT% - TSI: %TSI% +fms_message = %DATE% %TIME%: %FMS%%BR%Status: %STATUS% - Direction: %DIRT% - TSI: %TSI% -# %ZVEI% = ZVEI 5-tone Code -# %DESCR% = Description from csv-file -# %TIME% = Time (by script) -# %DATE% = Date (by script) +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) zvei_subject = Alarm: %ZVEI% zvei_message = %DATE% %TIME%: %ZVEI% -# %RIC% = Pocsag RIC -# %FUNC% = Pocsac function/Subric (1-4) +# %RIC% = Pocsag RIC +# %FUNC% = Pocsac function/Subric (1-4) # %FUNCCHAR% = Pocsac function/Subric als character (a-d) -# %MSG% = Message of the Pocsag telegram -# %BITRATE% = Bitrate of the Pocsag telegram -# %DESCR% = Description from csv-file -# %TIME% = Time (by script) -# %DATE% = Date (by script) -poc_subject = Alarm: %RIC%%FUNCCHAR% -poc_message = %DATE% %TIME%: %MSG% +# %FUNCTEXT% = Pocsac function/Subric static massage definded in pocsag section +# %MSG% = Message of the Pocsag telegram +# %BITRATE% = Bitrate of the Pocsag telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %BR% = Insert line wrap (only in message) +# %LPAR% = ( +# %RPAR% = ) +poc_subject = Alarm: %RIC%%LPAR%%FUNCCHAR%%RPAR% +poc_message = %DATE% %TIME% - %DESCR%: %MSG% [BosMon] @@ -220,6 +275,7 @@ bosmon_password = firserver = localhost firport = 9001 + [jsonSocket] # Protocol for socket (TCP|UDP) protocol = UDP @@ -228,6 +284,169 @@ server = 192.168.0.1 port = 8888 +[notifyMyAndroid] +# this APIKey is used for Plugin +APIKey = + +# Priority goes from -2 (lowest) to 2 (highest). the default priority is 0 (normal) +priority = 0 + +# You could change the name of the application (default: BOSWatch) +# (f.e. if you use more than one instance of BOSWatch) +appName = BOSWatch + +# instead of a given APIKey/priority you could import them by a csv-file (0|1) +# APIKey and prioiry above will be ignored, if you use a csv +# configuration loaded from csv/nma.csv +usecsv = 0 + + +[SMS] +# be aware that you need 'gammu' installed and running +# at least you need an UMTS-stick which is supported by 'gammu' + +quantity = 1 +# be sensitive to single RIC +ric1 = 1234567 + +# but you can watch several subrics, comma-separated +subric1 = a, b + +# a single cellphone-number +phonenumber1 = 0160321654987 + +# and the text for the sms +# ! DO NOT USE ANY UMLAUT ! +text1 = Rueckruf Leitstelle! + + +[Sms77] +# SMS77 configuration +# Login Username +user = + +# Password or API Key +password = + +# Receiver singlenumber or groupname from adressbook +to = + +# Sender number or name +from = + +# Type of Message (see https://www.sms77.de/funktionen/smstypen and https://www.sms77.de/funktionen/http-api) +type = quality + + +[FFAgent] +# set live mode (0/1) +live = 0 + +# send messages as type test (0/1) +test = 1 + +# path to server certificate file +serverCertFile = + +# path to client certificate file (LIVE) +clientCertFile = + +# path to client certificate password file (LIVE) +clientCertPass = + +# webapi token +webApiToken = + +# webapi key +webApiKey = + +# access token +accessToken = + +# selective Call Code +selectiveCallCode = + + +[Pushover] +# Pushover API Key +api_key = + +# Pushover Userkey or Groupkey to receive message +user_key = + +# Title of the message +title = BOSWatch Message + +# Adapt Pocsag Subric (a,b,c,d) to Pushover Priorities (see https://pushover.net/api#priority) +SubA = 0 +SubB = 2 +SubC = 1 +SubD = 0 + +# how often should Pushover re-alert in seconds (emergency-messages) +retry = 30 + +# when should Pushover stop to re-alert in seconds (emergency-messages) +expire = 90 + +# use HTML in messages (0/1) +html = 1 + + +[Telegram] +# This is your unique BOT token. You will get it from the BotFather once you have created your BOT. +BOTTokenAPIKey = +# Create a group chat with your BOT and enter the chat ID here. +# The plugin will send messages as your BOT and post everything in this group chat. +BOTChatIDAPIKey = +# The plugin can extract a location from the POCSAG message. +# However, this will be done for the following RIC only (7 digits e.g. 0012345). +RICforLocationAPIKey = +# This is your Google API key. +# Required if you want to create a map based on location information received with the above RIC. +GoogleAPIKey = + +[yowsup] +# number or chat-number who whants to become the news +empfaenger = +# WhatsApp-number of that the news comes +sender = +# password from this number +password= + +# %FMS% = FMS Code +# %STATUS% = FMS Status +# %DIR% = Direction of the telegram (0/1) +# %DIRT% = Direction of the telegram (Text-String) +# %TSI% = Tactical Short Information (I-IV) +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +fms_message = %DATE% %TIME%: %FMS% + +# %ZVEI% = ZVEI 5-tone Code +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +zvei_message = %DATE% %TIME%: %ZVEI% + +# %RIC% = Pocsag RIC +# %FUNC% = Pocsac function/Subric (1-4) +# %FUNCCHAR% = Pocsac function/Subric als character (a-d) +# %MSG% = Message of the Pocsag telegram +# %BITRATE% = Bitrate of the Pocsag telegram +# %DESCR% = Description, if description-module is used +# %DATE% = Date (by script) +# %TIME% = Time (by script) +# %LPAR% = ( +# %RPAR% = ) +poc_message = %MSG% + + ##################### ##### Not ready yet # ##################### diff --git a/csv/fms.csv b/csv/fms.csv index a9260fd..8ee6668 100644 --- a/csv/fms.csv +++ b/csv/fms.csv @@ -7,4 +7,4 @@ fms,description # # !!! DO NOT delete the first line !!! # -12345678,"FMS testdata" +12345678,"FMS testdata äöüß" diff --git a/csv/nma.csv b/csv/nma.csv new file mode 100644 index 0000000..f13795a --- /dev/null +++ b/csv/nma.csv @@ -0,0 +1,32 @@ +typ,id,APIKey,priority,eventPrefix,comment +# +# BOSWatch CSV file for notifyMyAndroid-Plugin +# +# For each id (FMS, ZVEI, POC) you could set multiple APIKeys with different prioties +# Use the structure: typ, id, APIKey, priority, eventPrefix, "comment" +# +# For more than one recipient you could you an id several times +# +# Typ: FMS|ZVEI|POC +# +# id: +# --- +# FMS: FMS Code +# ZVEI: ZVEI 5-tone Code +# POCSAG: POCSAG RIC + functionChar +# 1234567a = entry only for functionChar a +# 1234567* = entry for all functionChars +# +# Priority: goes from -2 (lowest) to 2 (highest). the default priority is 0 (normal) +# +# Event-Präfix: will be insert in front of "id/description" +# f.e.: "Alarm: 1234567" or "Alarm: POCSAG testdata äöüß" +# +# !!! DO NOT delete the first line !!! +# +POC,1000512*,123456789012345678901234567890123456789012345678,0,"","Test for *" +POC,1000000a,123456789012345678901234567890123456789012345678,-2,"Probe","Priority-Test" +POC,1000000a,234567890123456789012345678901234567890123456789,-1,"Probe","Priority-Test" +POC,1000001b,123456789012345678901234567890123456789012345678,2,"Alarm","Priority-Test" +POC,1000002c,123456789012345678901234567890123456789012345678,1,"Vor-Alarm","Priority-Test" +POC,1000003d,123456789012345678901234567890123456789012345678,0,"Info-Alarm","Priority-Test" diff --git a/csv/poc.csv b/csv/poc.csv index 44ddacb..87a5073 100644 --- a/csv/poc.csv +++ b/csv/poc.csv @@ -7,4 +7,4 @@ ric,description # # !!! DO NOT delete the first line !!! # -1234567,"POCSAG testdata" +1234567,"POCSAG testdata äöüß" diff --git a/csv/zvei.csv b/csv/zvei.csv index ebfc9e0..1be0548 100644 --- a/csv/zvei.csv +++ b/csv/zvei.csv @@ -7,4 +7,4 @@ zvei,description # # !!! DO NOT delete the first line !!! # -12345,"ZVEI testdata" +12345,"ZVEI testdata äöüß" diff --git a/exampleAddOns/alarmMonitorRPi/alarmMonitor.py b/exampleAddOns/alarmMonitorRPi/alarmMonitor.py new file mode 100644 index 0000000..f18bb15 --- /dev/null +++ b/exampleAddOns/alarmMonitorRPi/alarmMonitor.py @@ -0,0 +1,358 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -*- +# + +""" +alarmMonitor + +This is an alarmMonitor for receive alarm-messages from BOSWatch and show them on a touchscreen +The jsonSocketServer controlls an Watterott RPi-Display in case of received POCSAG-RIC + +Implemented functions: +- show ric-description and alarm-message on display +- history of up to 5 alarms +- different colours for no alarm, test alarm and alarm +- playing a soundfile in case of an alarm +- show POCSAG is alive status (coloured clock) +- asynchronous threads for display control +- auto-turn-off display +- status informations +- rotating logfile in /var/log/alarmMonitor + +@author: Jens Herrmann + +BOSWatch: https://github.com/Schrolli91/BOSWatch +RPi-Display: https://github.com/watterott/RPi-Display +""" + +import logging +import logging.handlers +import ConfigParser + +import os +import time +import socket # for socket +import json # for data +from threading import Thread +import pygame + +import globalData + +try: + # + # Logging + # + try: + # set/create log_path + log_path = "/var/log/alarmMonitor/" + if not os.path.exists(log_path): + os.mkdir(log_path) + + # init logger + myLogger = logging.getLogger() + myLogger.setLevel(logging.DEBUG) + formatter = logging.Formatter('%(asctime)s - %(module)-15s [%(levelname)-8s] %(message)s', '%d.%m.%Y %H:%M:%S') + + # display logger + ch = logging.StreamHandler() + ch.setLevel(logging.INFO) + #ch.setLevel(logging.DEBUG) + ch.setFormatter(formatter) + myLogger.addHandler(ch) + + # fileLogger: + fh = logging.handlers.TimedRotatingFileHandler(log_path+"alarmMonitor.log", "midnight", interval=1, backupCount=7) + fh.setLevel(logging.DEBUG) + fh.setFormatter(formatter) + myLogger.addHandler(fh) + # start with a new logfile + fh.doRollover() + except: + # we couldn't work without logging -> exit + logging.critical("cannot initialise logging") + logging.debug("cannot initialise logging", exc_info=True) + exit(1) + + + # + # Read config.ini + # + try: + logging.debug("reading config file") + globalData.config = ConfigParser.SafeConfigParser() + globalData.config.read("config.ini") + # if given loglevel is debug: + logging.debug("- [AlarmMonitor]") + for key,val in globalData.config.items("AlarmMonitor"): + logging.debug("-- %s = %s", key, val) + logging.debug("- [Display]") + for key,val in globalData.config.items("Display"): + logging.debug("-- %s = %s", key, val) + except: + # we couldn't work without config -> exit + logging.critical("cannot read config file") + logging.debug("cannot read config file", exc_info=True) + exit(1) + + # + # set environment for display and touchscreen + # + os.environ["SDL_FBDEV"] = "/dev/fb1" + os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen" + os.environ["SDL_MOUSEDRV"] = "TSLIB" + + # + # start threads + # + try: + from displayServices import displayPainter, autoTurnOffDisplay, eventHandler + globalData.screenBackground = pygame.Color(globalData.config.get("AlarmMonitor","colourGreen")) + logging.debug("Start displayPainter-thread") + Thread(target=displayPainter).start() + logging.debug("start autoTurnOffDisplay-thread") + Thread(target=autoTurnOffDisplay).start() + logging.debug("start eventHandler-thread") + Thread(target=eventHandler).start() + except: + # we couldn't work without helper threads -> exit + logging.critical("cannot start service-Threads") + logging.debug("cannot start service-Threads", exc_info=True) + exit(1) + + # + # start socket + # + logging.debug("Start socketServer") + sock = socket.socket () # TCP + sock.bind(("",globalData.config.getint("AlarmMonitor","socketPort"))) + sock.listen(5) + logging.debug("socketServer runs") + + # + # Build Lists out of config-entries + # + logging.debug("create lists") + keepAliveRICs = [int(x.strip()) for x in globalData.config.get("AlarmMonitor","keepAliveRICs").replace(";", ",").split(",")] + logging.debug("-- keepAliveRICs: %s", keepAliveRICs) + alarmRICs = [int(x.strip()) for x in globalData.config.get("AlarmMonitor","alarmRICs").replace(";", ",").split(",")] + logging.debug("-- alarmRICs: %s", alarmRICs) + functionCharTestAlarm = [str(x.strip()) for x in globalData.config.get("AlarmMonitor","functionCharTestAlarm").replace(";", ",").split(",")] + logging.debug("-- functionCharTestAlarm: %s", functionCharTestAlarm) + functionCharAlarm = [str(x.strip()) for x in globalData.config.get("AlarmMonitor","functionCharAlarm").replace(";", ",").split(",")] + logging.debug("-- functionCharAlarm: %s", functionCharAlarm) + + # + # try to read History from MySQL-DB + # + try: + if globalData.config.getboolean("AlarmMonitor","loadHistory") == True: + import mysql.connector + + for key,val in globalData.config.items("MySQL"): + logging.debug("-- %s = %s", key, val) + + # Connect to DB + logging.debug("connect to MySQL") + connection = mysql.connector.connect(host = globalData.config.get("MySQL","dbserver"), user = globalData.config.get("MySQL","dbuser"), passwd = globalData.config.get("MySQL","dbpassword"), db = globalData.config.get("MySQL","database"), charset='utf8') + cursor = connection.cursor() + logging.debug("MySQL connected") + + # read countKeepAlive + # precondition: keepAliveRICs set + if (len(keepAliveRICs) > 0): + sql = "SELECT COUNT(*) FROM "+globalData.config.get("MySQL","tablePOC")+" WHERE ric IN ("+globalData.config.get("AlarmMonitor","keepAliveRICs")+")" + cursor.execute(sql) + result = int(cursor.fetchone()[0]) + if result > 0: + globalData.countKeepAlive = result + logging.debug("-- countKeepAlive: %s", globalData.countKeepAlive) + + # read countAlarm + # precondition: alarmRics and functionChar set + if (len(alarmRICs) > 0) and (len(functionCharAlarm) > 0): + sql = "SELECT COUNT(*) FROM "+globalData.config.get("MySQL","tablePOC")+" WHERE ric IN ("+globalData.config.get("AlarmMonitor","alarmRICs")+")" + if len(functionCharAlarm) == 1: + sql += " AND functionChar IN ('" + functionCharAlarm[0] + "')" + elif len(functionCharAlarm) > 1: + sql += " AND functionChar IN " + str(tuple(functionCharAlarm)) + cursor.execute(sql) + result = int(cursor.fetchone()[0]) + if result > 0: + globalData.countAlarm = result + logging.debug("-- countAlarm: %s", globalData.countAlarm) + + # read countTestAlarm + # precondition: alarmRics and functionCharTestAlarm set + if (len(alarmRICs) > 0) and (len(functionCharTestAlarm) > 0): + sql = "SELECT COUNT(*) FROM "+globalData.config.get("MySQL","tablePOC")+" WHERE ric IN ("+globalData.config.get("AlarmMonitor","alarmRICs")+")" + if len(functionCharTestAlarm) == 1: + sql += " AND functionChar IN ('" + functionCharTestAlarm[0] + "')" + elif len(functionCharTestAlarm) > 1: + sql += " AND functionChar IN " + str(tuple(functionCharTestAlarm)) + cursor.execute(sql) + result = int(cursor.fetchone()[0]) + if result > 0: + globalData.countTestAlarm = result + logging.debug("-- countTestAlarm: %s", globalData.countTestAlarm) + + # read the last 5 events in reverse order + # precondition: alarmRics and (functionChar or functionCharTestAlarm) set + if (len(alarmRICs) > 0) and ((len(functionCharAlarm) > 0) or (len(functionCharTestAlarm) > 0)): + sql = "SELECT UNIX_TIMESTAMP(time), ric, functionChar, msg, description FROM "+globalData.config.get("MySQL","tablePOC") + sql += " WHERE ric IN ("+globalData.config.get("AlarmMonitor","alarmRICs")+")" + functionChar = functionCharAlarm + functionCharTestAlarm + if len(functionChar) == 1: + sql += " AND functionChar IN ('" + functionChar[0] + "')" + elif len(functionChar) > 1: + sql += " AND functionChar IN " + str(tuple(functionChar)) + sql += " ORDER BY time DESC LIMIT 0,5" + cursor.execute(sql) + # reverse sort into history data + for (timestamp, ric, functionChar, msg, description) in reversed(cursor.fetchall()): + data = {} + data['timestamp'] = timestamp + data['ric'] = ric + data['functionChar'] = functionChar + data['msg'] = msg + data['description'] = description + globalData.alarmHistory.append(data) + logging.debug("-- history data loaded: %s", len(globalData.alarmHistory)) + + logging.info("history loaded from database") + # if db is enabled + pass + except: + # error, but we could work without history + logging.error("cannot load history from MySQL") + logging.debug("cannot load history from MySQL", exc_info=True) + pass + finally: + try: + cursor.close() + connection.close() + logging.debug("MySQL closed") + except: + pass + + # + # initialise alarm sound + # + alarmSound = False + try: + if globalData.config.getboolean("AlarmMonitor","playSound") == True: + if not globalData.config.get("AlarmMonitor","soundFile") == "": + pygame.mixer.init() + alarmSound = pygame.mixer.Sound(globalData.config.get("AlarmMonitor","soundFile")) + logging.info("alarm with sound") + except: + # error, but we could work without sound + logging.error("cannot initialise alarm sound") + logging.debug("cannot initialise alarm sound", exc_info=True) + pass + + globalData.startTime = int(time.time()) + logging.info("alarmMonitor started - on standby") + + # + # Main Program + # (Threads will set abort to True if an error occurs) + # + while globalData.abort == False: + # accept connections from outside + (clientsocket, address) = sock.accept() + logging.debug("connected client: %s", address) + + # recv message as json_string + json_string = clientsocket.recv( 4096 ) # buffer size is 1024 bytes + try: + # parsing jason + parsed_json = json.loads(json_string) + logging.debug("parsed message: %s", parsed_json) + except ValueError: + # we will ignore waste in json_string + logging.warning("No JSON object could be decoded: %s", json_string) + pass + else: + try: + logging.debug("Alarmmessage arrived") + logging.debug("-- ric: %s", parsed_json['ric']) + logging.debug("-- functionChar: %s", parsed_json['functionChar']) + + # current time for this loop: + curtime = int(time.time()) + + # keep alive calculation with additional RICs + if int(parsed_json['ric']) in keepAliveRICs: + logging.info("POCSAG is alive") + globalData.lastAlarm = curtime + globalData.countKeepAlive += 1 + + # (test) alarm processing + elif int(parsed_json['ric']) in alarmRICs: + if parsed_json['functionChar'] in functionCharTestAlarm: + logging.info("--> Probealarm: %s", parsed_json['ric']) + globalData.screenBackground = pygame.Color(globalData.config.get("AlarmMonitor","colourYellow")) + globalData.countTestAlarm += 1 + elif parsed_json['functionChar'] in functionCharAlarm: + logging.info("--> Alarm: %s", parsed_json['ric']) + globalData.screenBackground = pygame.Color(globalData.config.get("AlarmMonitor","colourRed")) + globalData.countAlarm += 1 + + # forward data to alarmMonitor + globalData.data = parsed_json + globalData.data['timestamp'] = curtime + logging.debug("-- data: %s", parsed_json) + # save 5 alarm history entries + globalData.alarmHistory.append(globalData.data) + if len(globalData.alarmHistory) > 5: + globalData.alarmHistory.pop(0) + # update lastAlarm for keep alive calculation + globalData.lastAlarm = curtime + # enable display for n seconds: + globalData.enableDisplayUntil = curtime + globalData.config.getint("AlarmMonitor","showAlarmTime") + # tell alarm-thread to turn on the display + globalData.navigation = "alarmPage" + globalData.showDisplay = True; + + # play alarmSound... + if not alarmSound == False: + # ... but only one per time... + if pygame.mixer.get_busy() == False: + alarmSound.play() + logging.debug("sound started") + + except KeyError: + # we will ignore waste in json_string + logging.warning("No RIC found: %s", json_string) + pass + +except KeyboardInterrupt: + logging.warning("Keyboard Interrupt") + exit(0) +except SystemExit: + logging.warning("SystemExit received") + exit(0) +except: + logging.exception("unknown error") +finally: + try: + logging.info("socketServer shuting down") + globalData.running = False + sock.close() + logging.debug("socket closed") + if not alarmSound == False: + pygame.mixer.quit() + logging.debug("mixer closed") + if connection: + connection.close() + logging.debug("MySQL closed") + time.sleep(0.5) + logging.debug("exiting socketServer") + except: + logging.warning("failed in clean-up routine") + finally: + # Close Logging + logging.debug("close Logging") + logging.info("socketServer exit()") + logging.shutdown() + ch.close() \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorRPi/config.template.ini b/exampleAddOns/alarmMonitorRPi/config.template.ini new file mode 100644 index 0000000..82c7ba5 --- /dev/null +++ b/exampleAddOns/alarmMonitorRPi/config.template.ini @@ -0,0 +1,66 @@ +############################ +# AlarmMonitor Config File # +############################ + +[AlarmMonitor] +# listen port for socket server +socketPort = 8112 + +# process alarms for the following RICs +alarmRICs = 1234567, 12345678 + +# use the following RICs for keep alive calculation (additonal) +keepAliveRICs = 1000000 + +# use the following functionChar for test alarms (if empty no test alarms will shown) +functionCharTestAlarm = a + +# use the following functionChar for alarms (if empty no alarms will shown) +# if functionChar is used in functionCharTestAlarm too, it will bee ignored for alarms +functionCharAlarm = b, c, d + +# Show alarm massage for n seconds +showAlarmTime = 180 + +# Show display for n seconds by touching +showDisplayTime = 30 + +# colouring status of RIC-decoding (n seconds after last alarm) +delayForYellow = 240 +delayForRed = 360 + +# colours for alarmMonitor +colourBlack = #000000 +colourRed = #B22222 +colourGreen = #008B00 +colourBlue = #00008B +colourYellow = #8B8B00 +colourGrey = #BEBEBE +colourDimGrey = #696969 +colourWhite = #FFFFFF + +# alarm sound (0|1) and set filename +playSound = 0 +soundFile = sound.file + +# load history data from MySQL (0|1) +loadHistory = 0 + + +[Display] +# Pin of LCD backlight (script will use only on/off) +GPIOPinForBacklight = 18 + +# display size +displayWidth = 320 +displayHeight = 240 + + +[MySQL] +dbserver = localhost +dbuser = root +dbpassword = root +database = boswatch + +#tables in the database +tablePOC = bos_pocsag \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorRPi/displayServices.py b/exampleAddOns/alarmMonitorRPi/displayServices.py new file mode 100644 index 0000000..8badbfe --- /dev/null +++ b/exampleAddOns/alarmMonitorRPi/displayServices.py @@ -0,0 +1,468 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -*- +# + +""" +alarmMonitor - displayServices + +@author: Jens Herrmann +""" + +# +# Only works as an asynchronous thread +# will call "exit(0)" when function is finished +# +def autoTurnOffDisplay(): + """ + Asynchronous function to turn of the display backlight + + @requires: globalData.showDisplay - status of backlight + @requires: globalData.enableDisplayUntil - given timestamp to turn off backlight + @requires: globalData.running - service runs as long as this is True + + In case of an exception the function set globalData.abort to True. + This will terminate the main program. + + @return: nothing + @exception: SystemExit exception in case of an error + """ + + import sys + import time + import logging + import ConfigParser + import globalData + + logging.debug("autoTurnOffDisplay-thread started") + + try: + # Running will be set to False if main program is shutting down + while globalData.running == True: + # check if timestamp is in the past + if (globalData.showDisplay == True) and (globalData.enableDisplayUntil < int(time.time())): + globalData.showDisplay = False + globalData.navigation = "alarmPage" + logging.info("display turned off") + # we will do this only one time per second + time.sleep(1) + except: + logging.error("unknown error in autoTurnOffDisplay-thread") + logging.debug("unknown error in autoTurnOffDisplay-thread", exc_info=True) + # abort main program + globalData.abort = True + sys.exit(1) + finally: + logging.debug("exit autoTurnOffDisplay-thread") + exit(0) + + +# +# Only works as an asynchronous thread +# will call "exit(0)" when function is finished +# +def eventHandler(): + """ + Asynchronous function to handle pygames events + in particular the touchscreen events + + @requires: globalData.showDisplay - status of backlight + @requires: globalData.enableDisplayUntil - timestamp to turn off backlight + @requires: globalData.running - service runs as long as this is True + @requires: configuration has to be set in the config.ini + + In case of an exception the function set globalData.abort to True. + This will terminate the main program. + + @return: nothing + @exception: SystemExit exception in case of an error + """ + import sys + import time + import logging + import ConfigParser + import pygame + import globalData + + logging.debug("eventHandler-thread started") + + try: + clock = pygame.time.Clock() + + # Running will be set to False if main program is shutting down + while globalData.running == True: + # This limits the while loop to a max of 2 times per second. + # Leave this out and we will use all CPU we can. + clock.tick(2) + + # current time for this loop: + curtime = int(time.time()) + + for event in pygame.event.get(): + # event-handler for QUIT + if event.type == pygame.QUIT: + globalData.running = False + + # if touchscreen pressed + if event.type == pygame.MOUSEBUTTONDOWN: + (posX, posY) = (pygame.mouse.get_pos() [0], pygame.mouse.get_pos() [1]) + #logging.debug("position: (%s, %s)", posX, posY) + + # touching the screen will stop alarmSound in every case + pygame.mixer.stop() + + # touching the dark display will turn it on for n sec + if globalData.showDisplay == False: + logging.info("turn ON display") + globalData.enableDisplayUntil = curtime + globalData.config.getint("AlarmMonitor","showDisplayTime") + globalData.navigation == "alarmPage" + globalData.showDisplay = True + else: + # touching the enabled display will be content sensitive... + # if top 2/3: turn of display + yBoundary = globalData.config.getint("Display","displayHeight") - 80 + if 0 <= posY <= yBoundary: + logging.info("turn OFF display") + globalData.showDisplay = False + globalData.navigation = "alarmPage" + else: + # we are in the navigation area + globalData.enableDisplayUntil = curtime + globalData.config.getint("AlarmMonitor","showDisplayTime") + if 0 <= posX <= 110: + globalData.navigation = "historyPage" + elif 111 <= posX <= 210: + globalData.navigation = "statusPage" + else: + globalData.screenBackground = pygame.Color(globalData.config.get("AlarmMonitor","colourGreen")) + globalData.navigation = "alarmPage" + ## end if showDisplay + ## end if event MOUSEBUTTONDOWN + ## end for event + except: + logging.error("unknown error in eventHandler-thread") + logging.debug("unknown error in eventHandler-thread", exc_info=True) + # abort main program + globalData.abort = True + sys.exit(1) + finally: + logging.debug("exit eventHandler-thread") + exit(0) + + +# +# Only works as an asynchronous thread +# will call "exit(0)" when function is finished +# +def displayPainter(): + """ + Asynchronous function to build the display content + + @requires: globalData.showDisplay - status of backlight + @requires: globalData.enableDisplayUntil - given timestamp when backlight will turned off + @requires: globalData.running - service runs as long as this is True + @requires: globalData.data - data of the last alarm + @requires: globalData.lastAlarm - timestamp of the last processing (see alarmRICs and keepAliveRICs) + @requires: configuration has to be set in the config.ini + + In case of an exception the function set globalData.abort to True. + This will terminate the main program. + + @return: nothing + @exception: SystemExit exception in case of an error + """ + + import sys + import time + import logging + import ConfigParser + import RPi.GPIO as GPIO + import pygame + from wrapline import wrapline + from roundrects import round_rect + import globalData + + logging.debug("displayPainter-thread called") + + try: + # use GPIO pin numbering convention + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + # set up GPIO pin for output + GPIO.setup(globalData.config.getint("Display","GPIOPinForBacklight"), GPIO.OUT) + + pygame.init() + + #screen size + size = (globalData.config.getint("Display","displayWidth"), globalData.config.getint("Display","displayHeight")) + screen = pygame.display.set_mode(size) + + # disable mouse cursor + pygame.mouse.set_visible(False) + + #define fonts + fontHeader = pygame.font.Font(None, 30) + fontHeader.set_bold(True) + fontHeader.set_underline(True) + + fontTime = pygame.font.Font(None, 15) + + fontRIC = pygame.font.Font(None, 30) + fontRIC.set_bold(True) + fontMsg = pygame.font.Font(None, 20) + fontHistory = pygame.font.Font(None, 15) + + fontStatus = pygame.font.Font(None, 20) + fontStatus.set_bold(True) + fontStatusContent = pygame.font.Font(None, 20) + + fontButton = pygame.font.Font(None, 20) + + clock = pygame.time.Clock() + + # Build Lists out of config-entries + functionCharTestAlarm = [x.strip() for x in globalData.config.get("AlarmMonitor","functionCharTestAlarm").replace(";", ",").split(",")] + + logging.debug("displayPainter-thread started") + + # Running will be set to False if main program is shutting down + while globalData.running == True: + # This limits the while loop to a max of 2 times per second. + # Leave this out and we will use all CPU we can. + clock.tick(2) + + # current time for this loop: + curtime = int(time.time()) + + if globalData.showDisplay == True: + # Enable LCD display + GPIO.output(globalData.config.getint("Display","GPIOPinForBacklight"), GPIO.HIGH) + # Clear the screen and set the screen background + screen.fill(globalData.screenBackground) + # paint black rect, so Background looks like a boarder + widthX = globalData.config.getint("Display","displayWidth") - 20 + widthY = globalData.config.getint("Display","displayHeight") - 20 + pygame.draw.rect(screen, pygame.Color(globalData.config.get("AlarmMonitor","colourBlack")), (10, 10, widthX, widthY)) + # header + header = fontHeader.render("Alarm-Monitor", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourRed"))) + (width, height) = fontHeader.size("Alarm-Monitor") + x = (int(globalData.config.getint("Display","displayWidth")) - width)/2 + screen.blit(header, (x, 20)) + + # show time of last alarm + if globalData.lastAlarm > 0: + try: + # format last alarm + lastAlarmString = time.strftime("%H:%M:%S", time.localtime(globalData.lastAlarm)) + # Color time: + # red: lastAlarm more than n (delayForRed) seconds past + if (int(globalData.lastAlarm) + globalData.config.getint("AlarmMonitor","delayForRed")) < curtime: + timeColour = pygame.Color(globalData.config.get("AlarmMonitor","colourRed")) + # yellow: lastAlarm more than n (delayForYellow) seconds past + elif (int(globalData.lastAlarm) + globalData.config.getint("AlarmMonitor","delayForYellow")) < curtime: + timeColour = pygame.Color(globalData.config.get("AlarmMonitor","colourYellow")) + # dgrey: normal + else: + timeColour = pygame.Color(globalData.config.get("AlarmMonitor","colourGreen")) + lastAlarm = fontTime.render(lastAlarmString, 1, timeColour) + (width, height) = fontTime.size(lastAlarmString) + x = globalData.config.getint("Display","displayWidth") - 20 - width + screen.blit(lastAlarm, (x, 20)) + except: + logging.debug("unknown error in lastAlarm", exc_info=True) + pass + ## end if globalData.lastAlarm > 0 + + # show remaining time before display will be turned off: + restZeit = globalData.enableDisplayUntil - curtime +1 + zeit = fontTime.render(str(restZeit), 1, pygame.Color(globalData.config.get("AlarmMonitor","colourDimGrey"))) + screen.blit(zeit, (20, 20)) + + # + # content given by navigation: + # default is "alarmPage" + # + # Startpoint for content + if globalData.navigation == "historyPage": + try: + y = 50 + for data in reversed(globalData.alarmHistory): + # Layout: + # Date Description + # Time Msg + + # Prepare date/time block + dateString = time.strftime("%d.%m.%y", time.localtime(data['timestamp'])) + timeString = time.strftime("%H:%M:%S", time.localtime(data['timestamp'])) + if int(fontHistory.size(dateString)[0]) > int(fontHistory.size(timeString)[0]): + (shifting, height) = fontHistory.size(dateString) + else: + (shifting, height) = fontHistory.size(timeString) + shifting += 5 + + # get colour + if data['functionChar'] in functionCharTestAlarm: + colour = globalData.config.get("AlarmMonitor","colourYellow") + else: + colour = globalData.config.get("AlarmMonitor","colourRed") + + # Paint Date/Time + screen.blit(fontHistory.render(dateString, 1, pygame.Color(colour)), (20, y)) + screen.blit(fontHistory.render(timeString, 1, pygame.Color(colour)), (20, y + height)) + + # Paint Description + try: + textLines = wrapline(data['description'], fontHistory, (globalData.config.getint("Display","displayWidth") - shifting - 40)) + for index, item in enumerate(textLines): + textZeile = fontHistory.render(item, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + screen.blit(textZeile, (20 + shifting, y)) + y += height + except KeyError: + pass + + # Paint Msg + try: + textLines = wrapline(data['msg'].replace("*", " * "), fontHistory, (globalData.config.getint("Display","displayWidth") - shifting - 40)) + for index, item in enumerate(textLines): + textZeile = fontHistory.render(item, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(textZeile, (20 + shifting, y)) + y += height + except KeyError: + pass + + # line spacing for next dataset + y += 2 + + ## end for globalData.alarmHistory + + except KeyError: + pass + ## end if globalData.navigation == "historyPage" + + elif globalData.navigation == "statusPage": + (width, height) = fontStatusContent.size("Anzahl Test-Alarme:") + y = 70 + x = width + 10 + # Running since: + title = fontStatusContent.render("Gestartet:", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + content = fontStatusContent.render(time.strftime("%d.%m.%Y %H:%M:%S", time.localtime(globalData.startTime)), 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(title, (20, y)) + screen.blit(content, (20 +x, y)) + y += height + 10 + + # Last Alarm + title = fontStatusContent.render("Letzte Nachricht:", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + if globalData.lastAlarm > 0: + content = fontStatusContent.render(time.strftime("%d.%m.%Y %H:%M:%S", time.localtime(globalData.lastAlarm)), 1, timeColour) + else: + content = fontStatusContent.render("-", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(title, (20, y)) + screen.blit(content, (20 +x, y)) + y += height + 10 + + # Number of Alarms + title = fontStatusContent.render("Anzahl Alarme:", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + content = fontStatusContent.render(str(globalData.countAlarm), 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(title, (20, y)) + screen.blit(content, (20 +x, y)) + y += height + 10 + + # Number of TestAlarms + title = fontStatusContent.render("Anzahl Test-Alarme:", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + content = fontStatusContent.render(str(globalData.countTestAlarm), 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(title, (20, y)) + screen.blit(content, (20 +x, y)) + y += height + 10 + + # Number of DAU-Msgs + title = fontStatusContent.render("Anzahl DAU-Tests:", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + content = fontStatusContent.render(str(globalData.countKeepAlive), 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(title, (20, y)) + screen.blit(content, (20 +x, y)) + y += height + 10 + + ## end if globalData.navigation == "statusPage" + + else: + y = 50 + + # Paint Date/Time + try: + dateTimeString = time.strftime("%d.%m.%Y %H:%M:%S", time.localtime(globalData.data['timestamp'])) + dateTimeRow = fontStatus.render(dateTimeString, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourDimGrey"))) + (width, height) = fontStatus.size(dateTimeString) + x = (int(globalData.config.getint("Display","displayWidth")) - width)/2 + screen.blit(dateTimeRow, (x, y)) + y += height + 10 + except KeyError: + pass + + # Paint Description + try: + textLines = wrapline(globalData.data['description'], fontRIC, (globalData.config.getint("Display","displayWidth") - 40)) + (width, height) = fontStatus.size(globalData.data['description']) + for index, item in enumerate(textLines): + textRow = fontRIC.render(item, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourWhite"))) + screen.blit(textRow, (20, y)) + y += height + 5 + except KeyError: + pass + + # Paint Msg + try: + y += 10 + textLines = wrapline(globalData.data['msg'].replace("*", " * "), fontMsg, (globalData.config.getint("Display","displayWidth") - 40)) + (width, height) = fontStatus.size(globalData.data['msg']) + for index, item in enumerate(textLines): + textRow = fontMsg.render(item, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + screen.blit(textRow, (20, y)) + y += height + except KeyError: + pass + ## end if default navigation + + # paint navigation buttons + buttonWidth = 80 + buttonHeight = 25 + buttonY = globalData.config.getint("Display","displayHeight") - buttonHeight - 2 + + round_rect(screen, ( 20, buttonY, buttonWidth, buttonHeight), pygame.Color(globalData.config.get("AlarmMonitor","colourDimGrey")), 10, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + buttonText = fontButton.render("Verlauf", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourBlack"))) + (width, height) = fontButton.size("Verlauf") + textX = 20 + (buttonWidth - width)/2 + textY = buttonY + (buttonHeight - height)/2 + screen.blit(buttonText, (textX, textY)) + + round_rect(screen, (120, buttonY, buttonWidth, buttonHeight), pygame.Color(globalData.config.get("AlarmMonitor","colourDimGrey")), 10, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + buttonText = fontButton.render("Status", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourBlack"))) + (width, height) = fontButton.size("Status") + textX = 120 + (buttonWidth - width)/2 + textY = buttonY + (buttonHeight - height)/2 + screen.blit(buttonText, (textX, textY)) + + round_rect(screen, (220, buttonY, buttonWidth, buttonHeight), pygame.Color(globalData.config.get("AlarmMonitor","colourDimGrey")), 10, 1, pygame.Color(globalData.config.get("AlarmMonitor","colourGrey"))) + buttonText = fontButton.render("Gelesen", 1, pygame.Color(globalData.config.get("AlarmMonitor","colourBlack"))) + (width, height) = fontButton.size("Gelesen") + textX = 220 + (buttonWidth - width)/2 + textY = buttonY + (buttonHeight - height)/2 + screen.blit(buttonText, (textX, textY)) + + ## end if globalData.showDisplay == True + + else: + GPIO.output(globalData.config.getint("Display","GPIOPinForBacklight"), GPIO.LOW) + + # Update display... + pygame.display.update() + ## end while globalData.running == True + + except: + logging.error("unknown error in displayPainter-thread") + logging.debug("unknown error in displayPainter-thread", exc_info=True) + # abort main program + globalData.abort = True + sys.exit(1) + finally: + logging.debug("exit displayPainter-thread") + GPIO.output(globalData.config.getint("Display","GPIOPinForBacklight"), GPIO.LOW) + GPIO.cleanup() + pygame.quit() + exit(0) diff --git a/exampleAddOns/alarmMonitorRPi/globalData.py b/exampleAddOns/alarmMonitorRPi/globalData.py new file mode 100644 index 0000000..b80bbbd --- /dev/null +++ b/exampleAddOns/alarmMonitorRPi/globalData.py @@ -0,0 +1,35 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -*- +# + +# configparser (Configparser) +config = 0 + +# control-params (Boolean) +running = True +showDisplay = False +abort = False + +# color of display-boarder +screenBackground = "" + +# navigation = "" +navigation = "alarmPage" + +# enable display until (Timestamp) +enableDisplayUntil = 0 + +# data-structure (Dict) +data = {} + +# last alarm shown (Timestamp) +lastAlarm = 0 + +# alarm history (List) +alarmHistory = [] + +# statusPage +startTime = 0 +countAlarm = 0 +countTestAlarm = 0 +countKeepAlive = 0 \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorRPi/roundrects.py b/exampleAddOns/alarmMonitorRPi/roundrects.py new file mode 100644 index 0000000..dbed0f8 --- /dev/null +++ b/exampleAddOns/alarmMonitorRPi/roundrects.py @@ -0,0 +1,63 @@ +""" +Rounded rectangles in both non-antialiased and antialiased varieties. + +@author: Sean J. McKiernan +https://github.com/Mekire/rounded-rects-pygame +""" + +import pygame as pg + +from pygame import gfxdraw + + +def round_rect(surface, rect, color, rad=20, border=0, inside=(0,0,0,0)): + """ + Draw a rect with rounded corners to surface. Argument rad can be specified + to adjust curvature of edges (given in pixels). An optional border + width can also be supplied; if not provided the rect will be filled. + Both the color and optional interior color (the inside argument) support + alpha. + """ + rect = pg.Rect(rect) + zeroed_rect = rect.copy() + zeroed_rect.topleft = 0,0 + image = pg.Surface(rect.size).convert_alpha() + image.fill((0,0,0,0)) + _render_region(image, zeroed_rect, color, rad) + if border: + zeroed_rect.inflate_ip(-2*border, -2*border) + _render_region(image, zeroed_rect, inside, rad) + surface.blit(image, rect) + + +def _render_region(image, rect, color, rad): + """Helper function for round_rect.""" + corners = rect.inflate(-2*rad, -2*rad) + for attribute in ("topleft", "topright", "bottomleft", "bottomright"): + pg.draw.circle(image, color, getattr(corners,attribute), rad) + image.fill(color, rect.inflate(-2*rad,0)) + image.fill(color, rect.inflate(0,-2*rad)) + + +def aa_round_rect(surface, rect, color, rad=20, border=0, inside=(0,0,0)): + """ + Draw an antialiased rounded rect on the target surface. Alpha is not + supported in this implementation but other than that usage is identical to + round_rect. + """ + rect = pg.Rect(rect) + _aa_render_region(surface, rect, color, rad) + if border: + rect.inflate_ip(-2*border, -2*border) + _aa_render_region(surface, rect, inside, rad) + + +def _aa_render_region(image, rect, color, rad): + """Helper function for aa_round_rect.""" + corners = rect.inflate(-2*rad-1, -2*rad-1) + for attribute in ("topleft", "topright", "bottomleft", "bottomright"): + x, y = getattr(corners, attribute) + gfxdraw.aacircle(image, x, y, rad, color) + gfxdraw.filled_circle(image, x, y, rad, color) + image.fill(color, rect.inflate(-2*rad,0)) + image.fill(color, rect.inflate(0,-2*rad)) diff --git a/exampleAddOns/alarmMonitorRPi/wrapline.py b/exampleAddOns/alarmMonitorRPi/wrapline.py new file mode 100644 index 0000000..1211ae4 --- /dev/null +++ b/exampleAddOns/alarmMonitorRPi/wrapline.py @@ -0,0 +1,50 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -*- +# + +""" +alarmMonitor - wrapline + +This snippet of code will convert a string of text into a list containing the lines it would break down into for a certain font and width + +@author: pygame.org +http://www.pygame.org/wiki/TextWrapping +""" + +def truncline(text, font, maxwidth): + real=len(text) + stext=text + l=font.size(text)[0] + cut=0 + a=0 + done=1 + old = None + while l > maxwidth: + a=a+1 + n=text.rsplit(None, a)[0] + if stext == n: + cut += 1 + stext= n[:-cut] + else: + stext = n + l=font.size(stext)[0] + real=len(stext) + done=0 + return real, done, stext + +def wrapline(text, font, maxwidth): + done=0 + wrapped=[] + + while not done: + nl, done, stext=truncline(text, font, maxwidth) + wrapped.append(stext.strip()) + text=text[nl:] + return wrapped + + +def wrap_multi_line(text, font, maxwidth): + """ returns text taking new lines into account. + """ + lines = chain(*(wrapline(line, font, maxwidth) for line in text.splitlines())) + return list(lines) \ No newline at end of file diff --git a/www/index.php b/exampleAddOns/alarmMonitorWeb/Alarm.php similarity index 50% rename from www/index.php rename to exampleAddOns/alarmMonitorWeb/Alarm.php index aeaa785..deb1208 100644 --- a/www/index.php +++ b/exampleAddOns/alarmMonitorWeb/Alarm.php @@ -1,4 +1,21 @@ + + + + + + +einloggen"; + exit; + } +?> + + -BOSWatch +Alamierungen +
- BOSWatch
- [�bersicht] - [Parser] - -

+ + +

+// } + + ?>
- + diff --git a/exampleAddOns/alarmMonitorWeb/LICENSE.txt b/exampleAddOns/alarmMonitorWeb/LICENSE.txt new file mode 100644 index 0000000..856b578 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/LICENSE.txt @@ -0,0 +1,63 @@ +Creative Commons Attribution 3.0 Unported +http://creativecommons.org/licenses/by/3.0/ + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + 2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. + 3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + 4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + 5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + 6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + 7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + 9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + 2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + 3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + 4. to Distribute and Publicly Perform Adaptations. + 5. + + For the avoidance of doubt: + 1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + 2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + 3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. + 2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + 3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + 6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/exampleAddOns/alarmMonitorWeb/MySQL-Import/login.sql b/exampleAddOns/alarmMonitorWeb/MySQL-Import/login.sql new file mode 100644 index 0000000..b7b4bc5 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/MySQL-Import/login.sql @@ -0,0 +1,51 @@ +-- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (armv7l) +-- +-- Host: localhost Database: login +-- ------------------------------------------------------ +-- Server version 5.5.43-0+deb7u1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `login` +-- + +DROP TABLE IF EXISTS `login`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `login` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(150) DEFAULT NULL, + `passwort` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `login` +-- + +LOCK TABLES `login` WRITE; +/*!40000 ALTER TABLE `login` DISABLE KEYS */; +INSERT INTO `login` VALUES ,(1,'Test','098f6bcd4621d373cade4e832627b4f6'); +/*!40000 ALTER TABLE `login` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + diff --git a/exampleAddOns/alarmMonitorWeb/config.php b/exampleAddOns/alarmMonitorWeb/config.php new file mode 100644 index 0000000..3d9fb88 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/config.php @@ -0,0 +1,13 @@ + diff --git a/exampleAddOns/alarmMonitorWeb/css/font-awesome.min.css b/exampleAddOns/alarmMonitorWeb/css/font-awesome.min.css new file mode 100644 index 0000000..ec53d4d --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/ie/PIE.htc b/exampleAddOns/alarmMonitorWeb/css/ie/PIE.htc new file mode 100644 index 0000000..ca3b547 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/ie/PIE.htc @@ -0,0 +1,96 @@ + + + + + + + + + diff --git a/exampleAddOns/alarmMonitorWeb/css/ie/backgroundsize.min.htc b/exampleAddOns/alarmMonitorWeb/css/ie/backgroundsize.min.htc new file mode 100644 index 0000000..9b2592e --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/ie/backgroundsize.min.htc @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/ie/html5shiv.js b/exampleAddOns/alarmMonitorWeb/css/ie/html5shiv.js new file mode 100644 index 0000000..dcf351c --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/ie/html5shiv.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); +for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d .style2, + #copyright ul, + #nav > ul, + .dropotron + { + position: relative; + -ms-behavior: url('css/ie/PIE.htc'); + } + + /* Section/Article */ + + section, + article + { + } + + section > .last-child, + article > .last-child + { + margin-bottom: 0; + } + + section.last-child, + article.last-child + { + margin-bottom: 0; + } + +/*********************************************************************************/ +/* Wrappers */ +/*********************************************************************************/ + + .wrapper + { + } + + .wrapper .title:before, + .wrapper .title:after + { + display: none; + } + + #header-wrapper + { + -ms-behavior: url('css/ie/backgroundsize.min.htc'); + } + +/*********************************************************************************/ +/* Copyright */ +/*********************************************************************************/ + + #copyright + { + margin: 0; + } diff --git a/exampleAddOns/alarmMonitorWeb/css/images/overlay.png b/exampleAddOns/alarmMonitorWeb/css/images/overlay.png new file mode 100644 index 0000000..a7d22e7 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/css/images/overlay.png differ diff --git a/exampleAddOns/alarmMonitorWeb/css/images/shadow.png b/exampleAddOns/alarmMonitorWeb/css/images/shadow.png new file mode 100644 index 0000000..a8b1165 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/css/images/shadow.png differ diff --git a/exampleAddOns/alarmMonitorWeb/css/skel.css b/exampleAddOns/alarmMonitorWeb/css/skel.css new file mode 100644 index 0000000..891f6a3 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/skel.css @@ -0,0 +1,250 @@ +/* Resets (http://meyerweb.com/eric/tools/css/reset/ | v2.0 | 20110126 | License: none (public domain)) */ + + html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}body{-webkit-text-size-adjust:none} + +/* Box Model */ + + *, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + } + +/* Container */ + + body { + /* min-width: (containers) */ + min-width: 1200px; + } + + .container { + margin-left: auto; + margin-right: auto; + + /* width: (containers) */ + width: 1200px; + } + + /* Modifiers */ + + /* 125% */ + .container.\31 25\25 { + width: 100%; + + /* max-width: (containers * 1.25) */ + max-width: 1500px; + + /* min-width: (containers) */ + min-width: 1200px; + } + + /* 75% */ + .container.\37 5\25 { + + /* width: (containers * 0.75) */ + width: 900px; + + } + + /* 50% */ + .container.\35 0\25 { + + /* width: (containers * 0.50) */ + width: 600px; + + } + + /* 25% */ + .container.\32 5\25 { + + /* width: (containers * 0.25) */ + width: 300px; + + } + +/* Grid */ + + .row > * { + float: left; + } + + .row:after, .row:before { + content: ''; + display: block; + clear: both; + height: 0; + } + + .row.uniform > * > :first-child { + margin-top: 0; + } + + .row.uniform > * > :last-child { + margin-bottom: 0; + } + + /* Gutters */ + + /* Normal */ + + .row > * { + /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ + padding: 40px 0 0 40px; + } + + .row { + /* margin: -(gutters.horizontal) 0 0 -(gutters.vertical) */ + margin: -40px 0 0 -40px; + } + + .row.uniform > * { + /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ + padding: 40px 0 0 40px; + } + + .row.uniform { + /* margin: -(gutters.vertical) 0 0 -(gutters.vertical) */ + margin: -40px 0 0 -40px; + } + + /* 200% */ + + .row.\32 00\25 > * { + /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ + padding: 80px 0 0 80px; + } + + .row.\32 00\25 { + /* margin: -(gutters.horizontal) 0 0 -(gutters.vertical) */ + margin: -80px 0 0 -80px; + } + + .row.uniform.\32 00\25 > * { + /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ + padding: 80px 0 0 80px; + } + + .row.uniform.\32 00\25 { + /* margin: -(gutters.vertical) 0 0 -(gutters.vertical) */ + margin: -80px 0 0 -80px; + } + + /* 150% */ + + .row.\31 50\25 > * { + /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ + padding: 60px 0 0 60px; + } + + .row.\31 50\25 { + /* margin: -(gutters.horizontal) 0 0 -(gutters.vertical) */ + margin: -60px 0 0 -60px; + } + + .row.uniform.\31 50\25 > * { + /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ + padding: 60px 0 0 60px; + } + + .row.uniform.\31 50\25 { + /* margin: -(gutters.vertical) 0 0 -(gutters.vertical) */ + margin: -60px 0 0 -60px; + } + + /* 50% */ + + .row.\35 0\25 > * { + /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ + padding: 20px 0 0 20px; + } + + .row.\35 0\25 { + /* margin: -(gutters.horizontal) 0 0 -(gutters.vertical) */ + margin: -20px 0 0 -20px; + } + + .row.uniform.\35 0\25 > * { + /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ + padding: 20px 0 0 20px; + } + + .row.uniform.\35 0\25 { + /* margin: -(gutters.vertical) 0 0 -(gutters.vertical) */ + margin: -20px 0 0 -20px; + } + + /* 25% */ + + .row.\32 5\25 > * { + /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ + padding: 10px 0 0 10px; + } + + .row.\32 5\25 { + /* margin: -(gutters.horizontal) 0 0 -(gutters.vertical) */ + margin: -10px 0 0 -10px; + } + + .row.uniform.\32 5\25 > * { + /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ + padding: 10px 0 0 10px; + } + + .row.uniform.\32 5\25 { + /* margin: -(gutters.vertical) 0 0 -(gutters.vertical) */ + margin: -10px 0 0 -10px; + } + + /* 0% */ + + .row.\30 \25 > * { + /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ + padding: 0; + } + + .row.\30 \25 { + /* margin: -(gutters.horizontal) 0 0 -(gutters.vertical) */ + margin: 0; + } + + /* Cells */ + + .\31 2u, .\31 2u\24, .\31 2u\28 1\29, .\31 2u\24\28 1\29 { width: 100%; clear: none; } + .\31 1u, .\31 1u\24, .\31 1u\28 1\29, .\31 1u\24\28 1\29 { width: 91.6666666667%; clear: none; } + .\31 0u, .\31 0u\24, .\31 0u\28 1\29, .\31 0u\24\28 1\29 { width: 83.3333333333%; clear: none; } + .\39 u, .\39 u\24, .\39 u\28 1\29, .\39 u\24\28 1\29 { width: 75%; clear: none; } + .\38 u, .\38 u\24, .\38 u\28 1\29, .\38 u\24\28 1\29 { width: 66.6666666667%; clear: none; } + .\37 u, .\37 u\24, .\37 u\28 1\29, .\37 u\24\28 1\29 { width: 58.3333333333%; clear: none; } + .\36 u, .\36 u\24, .\36 u\28 1\29, .\36 u\24\28 1\29 { width: 50%; clear: none; } + .\35 u, .\35 u\24, .\35 u\28 1\29, .\35 u\24\28 1\29 { width: 41.6666666667%; clear: none; } + .\34 u, .\34 u\24, .\34 u\28 1\29, .\34 u\24\28 1\29 { width: 33.3333333333%; clear: none; } + .\33 u, .\33 u\24, .\33 u\28 1\29, .\33 u\24\28 1\29 { width: 25%; clear: none; } + .\32 u, .\32 u\24, .\32 u\28 1\29, .\32 u\24\28 1\29 { width: 16.6666666667%; clear: none; } + .\31 u, .\31 u\24, .\31 u\28 1\29, .\31 u\24\28 1\29 { width: 8.3333333333%; clear: none; } + + .\31 2u\24 + *, .\31 2u\24\28 1\29 + *, + .\31 1u\24 + *, .\31 1u\24\28 1\29 + *, + .\31 0u\24 + *, .\31 0u\24\28 1\29 + *, + .\39 u\24 + *, .\39 u\24\28 1\29 + *, + .\38 u\24 + *, .\38 u\24\28 1\29 + *, + .\37 u\24 + *, .\37 u\24\28 1\29 + *, + .\36 u\24 + *, .\36 u\24\28 1\29 + *, + .\35 u\24 + *, .\35 u\24\28 1\29 + *, + .\34 u\24 + *, .\34 u\24\28 1\29 + *, + .\33 u\24 + *, .\33 u\24\28 1\29 + *, + .\32 u\24 + *, .\32 u\24\28 1\29 + *, + .\31 u\24 + *, .\31 u\24\28 1\29 + * { + clear: left; + } + + .\-11u { margin-left: 91.6666666667% } + .\-10u { margin-left: 83.3333333333% } + .\-9u { margin-left: 75% } + .\-8u { margin-left: 66.6666666667% } + .\-7u { margin-left: 58.3333333333% } + .\-6u { margin-left: 50% } + .\-5u { margin-left: 41.6666666667% } + .\-4u { margin-left: 33.3333333333% } + .\-3u { margin-left: 25% } + .\-2u { margin-left: 16.6666666667% } + .\-1u { margin-left: 8.3333333333% } \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/style-1000px.css b/exampleAddOns/alarmMonitorWeb/css/style-1000px.css new file mode 100644 index 0000000..337c7c7 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/style-1000px.css @@ -0,0 +1,104 @@ +/* + Escape Velocity by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +/*********************************************************************************/ +/* Basic */ +/*********************************************************************************/ + + body + { + min-width: 1000px; + } + + body, input, select, textarea + { + font-size: 12pt; + line-height: 1.5em; + letter-spacing: 0.015em; + } + + body + { + min-width: 960px; + } + +/*********************************************************************************/ +/* Wrappers */ +/*********************************************************************************/ + + .wrapper + { + padding: 4em 0 7em 0; + } + + #intro-wrapper + { + padding-bottom: 7em; + } + + #footer-wrapper + { + } + + #footer-wrapper hr + { + margin: 3em 0 3em 0; + } + +/*********************************************************************************/ +/* Header */ +/*********************************************************************************/ + + #header + { + padding: 10em 0; + } + + .homepage #header + { + padding: 14em 0; + } + +/*********************************************************************************/ +/* Logo */ +/*********************************************************************************/ + + #logo + { + margin-top: -0.5em !important; + } + + #logo h1 + { + font-size: 1.75em; + } + +/*********************************************************************************/ +/* Intro */ +/*********************************************************************************/ + + #intro + { + } + + #intro > .style1 + { + font-size: 1.25em; + } + + #intro > .style2 + { + font-size: 2.25em; + } + +/*********************************************************************************/ +/* Copyright */ +/*********************************************************************************/ + + #copyright + { + margin: 3em 0 0 0; + } \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/style-desktop.css b/exampleAddOns/alarmMonitorWeb/css/style-desktop.css new file mode 100644 index 0000000..35c5079 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/style-desktop.css @@ -0,0 +1,574 @@ +/* + Escape Velocity by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +/*********************************************************************************/ +/* Basic */ +/*********************************************************************************/ + + body, input, select, textarea + { + font-size: 13pt; + line-height: 1.75em; + letter-spacing: 0.025em; + } + + body + { + min-width: 1200px; + } + + hr + { + margin: 2em 0 2em 0; + } + + /* Section/Article */ + + section, + article + { + margin: 0 0 4em 0; + } + + header.style1 + { + padding: 3em 0 3em 0; + } + + header.style1 h2 + { + font-size: 2em; + letter-spacing: 0.075em; + line-height: 1.5em; + } + + header.style1 p + { + display: block; + margin: 1.15em 0 0 0; + font-size: 1.3em; + letter-spacing: 0.075em; + line-height: 1.5em; + } + + /* Form */ + + form + { + } + + form label + { + margin: 0.25em 0 0.5em 0; + } + + /* Button */ + + input[type="button"], + input[type="submit"], + input[type="reset"], + .button + { + padding: 0 2.25em 0 2.25em; + font-size: 0.9em; + min-width: 12em; + height: 4em; + line-height: 4em; + } + + input[type="button"].big, + input[type="submit"].big, + input[type="reset"].big, + .button.big + { + font-size: 1em; + min-width: 14em; + } + + /* List */ + + ul + { + } + + ul.actions + { + margin: 3em 0 0 0; + } + + form ul.actions + { + margin-top: 0; + } + + ul.actions li + { + display: inline-block; + margin: 0 0.75em 0 0.75em; + } + + ul.actions li:first-child + { + margin-left: 0; + } + + ul.actions li:last-child + { + margin-right: 0; + } + + ul.actions-centered + { + text-align: center; + } + + /* Feature List */ + + .feature-list + { + } + + .feature-list section + { + padding-top: 2em; + border-top: solid 1px #eee; + } + + .feature-list .row + { + } + + .feature-list .row:first-child + { + } + + .feature-list .row:first-child section + { + padding-top: 0; + border-top: 0; + } + + .feature-list h3 + { + margin: 0 0 0.75em 0; + font-size: 1.15em; + letter-spacing: 0.05em; + margin-top: -0.35em; + } + + .feature-list h3:before + { + width: 64px; + height: 64px; + line-height: 64px; + margin-right: 0.75em; + font-size: 32px; + top: 0.2em; + } + + .feature-list p + { + margin: 0 0 0 5em; + } + + .feature-list.small + { + } + + .feature-list.small h3 + { + } + + .feature-list.small h3:before + { + font-size: 24px; + line-height: 45px; + width: 45px; + height: 45px; + margin-right: 1em; + } + + .feature-list.small p + { + margin: 0 0 0 4em; + } + + /* Box */ + + .box + { + } + + .box header + { + margin: 0 0 1.5em 0; + } + + .box header.style1 + { + position: relative; + margin: -0.5em 0 0 0; + padding-top: 0; + } + + .box h2 + { + margin: 0 0 0.75em 0; + font-size: 1.15em; + letter-spacing: 0.05em; + } + + .box h3 + { + margin: 0 0 0.5em 0; + font-size: 1em; + font-weight: 600; + letter-spacing: 0.05em; + } + + .box.post-excerpt + { + } + + .box.post-excerpt .image.left + { + position: relative; + top: 0.5em; + width: 5em; + } + + .box.-post-excerpt h3, + .box.post-excerpt p + { + margin-left: 7em; + } + +/*********************************************************************************/ +/* Wrappers */ +/*********************************************************************************/ + + .wrapper + { + padding: 6em 0 9em 0; + } + + .wrapper .title + { + font-size: 0.9em; + width: 25em; + height: 3.25em; + top: -3.25em; + line-height: 3.25em; + margin-bottom: -3.25em; + margin-left: -12.5em; + padding-top: 0.5em; + } + + #header-wrapper + { + padding: 0; + } + + #intro-wrapper + { + padding-bottom: 8em; + } + +/*********************************************************************************/ +/* Header */ +/*********************************************************************************/ + + #header + { + position: relative; + padding: 5.5em 0; + } + + .homepage #header + { + padding: 18em 0; + } + +/*********************************************************************************/ +/* Logo */ +/*********************************************************************************/ + + #logo + { + position: absolute; + height: 5em; + top: 50%; + left: 0; + width: 100%; + text-align: center; + margin-top: -0.5em; + } + + .homepage #logo + { + margin-top: -1em; + } + + #logo h1 + { + font-size: 2em; + letter-spacing: 0.25em; + } + + #logo p + { + margin: 1.25em 0 0 0; + display: block; + letter-spacing: 0.2em; + font-size: 0.9em; + } + +/*********************************************************************************/ +/* Nav */ +/*********************************************************************************/ + + #nav + { + position: absolute; + display: block; + top: 2.5em; + left: 0; + width: 100%; + text-align: center; + } + + #nav > ul > li > ul + { + display: none; + } + + #nav > ul + { + display: inline-block; + border-radius: 0.35em; + box-shadow: inset 0px 0px 1px 1px rgba(255,255,255,0.25); + padding: 0 1.5em 0 1.5em; + } + + #nav > ul > li + { + display: inline-block; + text-align: center; + padding: 0 1.5em 0 1.5em; + } + + #nav > ul > li > a, + #nav > ul > li > span + { + display: block; + color: #eee; + color: rgba(255,255,255,0.75); + text-transform: uppercase; + text-decoration: none; + font-size: 0.7em; + letter-spacing: 0.25em; + height: 5em; + line-height: 5em; + -moz-transition: all .25s ease-in-out; + -webkit-transition: all .25s ease-in-out; + -o-transition: all .25s ease-in-out; + -ms-transition: all .25s ease-in-out; + transition: all .25s ease-in-out; + outline: 0; + } + + #nav > ul > li:hover > a, + #nav > ul > li.active > a, + #nav > ul > li.active > span + { + color: #fff; + } + + .dropotron + { + background: #222835 url('images/overlay.png'); + background-color: rgba(44,50,63,0.925); + padding: 1.25em 1em 1.25em 1em; + border-radius: 0.35em; + box-shadow: inset 0px 0px 1px 1px rgba(255,255,255,0.25); + min-width: 12em; + text-align: left; + margin-top: -1.25em; + margin-left: -1px; + } + + .dropotron.level-0 + { + margin-top: -1px; + margin-left: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .dropotron a, + .dropotron span + { + display: block; + color: #eee; + color: rgba(255,255,255,0.75); + text-transform: uppercase; + text-decoration: none; + font-size: 0.7em; + letter-spacing: 0.25em; + border-top: solid 1px rgba(255,255,255,0.15); + line-height: 3em; + -moz-transition: all .25s ease-in-out; + -webkit-transition: all .25s ease-in-out; + -o-transition: all .25s ease-in-out; + -ms-transition: all .25s ease-in-out; + transition: all .25s ease-in-out; + } + + .dropotron li:first-child a, + .dropotron li:first-child span + { + border-top: 0; + } + + .dropotron li:hover > a, + .dropotron li:hover > span + { + color: #fff; + } + +/*********************************************************************************/ +/* Intro */ +/*********************************************************************************/ + + #intro + { + text-align: center; + } + + #intro > .style1 + { + font-size: 1.5em; + letter-spacing: 0.075em; + } + + #intro > .style2 + { + font-size: 2.75em; + letter-spacing: 0.075em; + line-height: 1.35em; + padding: 1em 0 1em 0; + margin-bottom: 1em; + } + + #intro > .style3 + { + font-size: 1.1em; + width: 48em; + margin: 0 auto; + } + +/*********************************************************************************/ +/* Features */ +/*********************************************************************************/ + + #features + { + padding: 0 6em 0 6em; + } + + #features header.style1 + { + padding-bottom: 5em; + } + + #features .actions + { + margin-top: 5em; + } + +/*********************************************************************************/ +/* Highlights */ +/*********************************************************************************/ + + #highlights + { + } + + #highlights .highlight + { + } + + #highlights .highlight h3 + { + margin: 0 0 0.75em 0; + font-size: 1.15em; + letter-spacing: 0.05em; + } + +/*********************************************************************************/ +/* Main */ +/*********************************************************************************/ + + #main + { + margin-top: 1em; + margin-bottom: 1em; + } + + .homepage #main + { + margin-top: 0; + margin-bottom: 0; + } + +/*********************************************************************************/ +/* Footer */ +/*********************************************************************************/ + + #footer + { + } + + #footer header.style1 + { + padding-bottom: 0; + } + + #footer hr + { + margin: 6em 0 6em 0; + } + +/*********************************************************************************/ +/* Copyright */ +/*********************************************************************************/ + + #copyright + { + margin: 6em 0 0 0; + } + + #copyright ul + { + padding: 0.75em 2em; + font-size: 0.9em; + } + + #copyright ul li + { + display: inline-block; + margin-left: 1em; + padding-left: 1em; + border-left: solid 1px #333; + border-left-color: rgba(255,255,255,0.05); + } + + #copyright ul li:first-child + { + border-left: 0; + margin-left: 0; + padding-left: 0; + } \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/style-mobile.css b/exampleAddOns/alarmMonitorWeb/css/style-mobile.css new file mode 100644 index 0000000..7ee86d6 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/style-mobile.css @@ -0,0 +1,417 @@ +/* + Escape Velocity by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +/*********************************************************************************/ +/* Basic */ +/*********************************************************************************/ + + body, input, select, textarea + { + line-height: 1.5em; + font-size: 10.5pt; + letter-spacing: 0; + } + + h2, h3, h4, h5, h6 + { + font-size: 1.2em; + letter-spacing: 0.05em; + margin: 0 0 1em 0; + } + + hr + { + margin: 1em 0 1em 0; + } + + /* Section/Article */ + + section, + article + { + clear: both; + padding: 1em 0 1em 0 !important; + } + + header + { + } + + header br + { + display: none; + } + + header.style1 + { + padding: 0 0 1em 0; + } + + header.style1 h2 + { + font-size: 1.5em; + letter-spacing: 0.075em; + line-height: 1.25em; + } + + header.style1 p + { + display: block; + margin: 0; + } + + /* Button */ + + input[type="button"], + input[type="submit"], + input[type="reset"], + .button + { + display: block; + width: 100%; + font-size: 1em; + padding: 1em 0 1em 0; + max-width: 30em; + margin: 0 auto; + } + + /* List */ + + ul.actions + { + margin: 2em 0 0 0; + } + + form ul.actions + { + margin: 1em 0 0 0; + } + + ul.actions li + { + margin: 15px 0 0 0; + } + + /* Feature List */ + + .feature-list + { + } + + .feature-list section + { + border-top: solid 1px #eee; + } + + /* Ugh ... disgusting. */ + .feature-list > div > div:first-child > div:first-child > section + { + border-top: 0; + padding-top: 0; + } + + .feature-list h3 + { + position: relative; + padding: 4px 0 0 48px; + line-height: 1.25em; + } + + .feature-list h3:before + { + position: absolute; + left: 0; + top: 0; + width: 32px; + height: 32px; + line-height: 32px; + font-size: 16px; + } + + .feature-list p + { + margin: 0 0 0 48px; + } + + /* Box */ + + .box + { + } + + .box.post-excerpt + { + } + + .box.post-excerpt .image.left + { + position: relative; + top: 0.25em; + width: 25%; + margin: 0; + } + + .box.post-excerpt h3, + .box.post-excerpt p + { + margin-left: 32.5%; + } + +/*********************************************************************************/ +/* Mobile UI */ +/*********************************************************************************/ + + #titleBar + { + background: none; + } + + #titleBar .title + { + display: none; + } + + #titleBar .toggle + { + position: absolute; + top: 0; + left: 0; + width: 60px; + height: 44px; + } + + #titleBar .toggle:before + { + font-family: FontAwesome; + text-decoration: none; + font-style: normal; + font-weight: normal; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale; + + content: '\f0c9'; + font-size: 14px; + position: absolute; + top: 6px; + left: 6px; + display: block; + width: 54px; + height: 38px; + line-height: 38px; + text-align: center; + color: rgba(255,255,255,0.75); + background-color: rgba(92,95,103,0.5); + border-radius: 0.25em; + -moz-transition: all .15s ease-in-out; + -webkit-transition: all .15s ease-in-out; + -o-transition: all .15s ease-in-out; + -ms-transition: all .15s ease-in-out; + transition: all .15s ease-in-out; + } + + #titleBar .toggle:active:before + { + background-color: rgba(92,95,103,0.75); + } + + #navPanel + { + background: #242730 url('images/overlay.png'); + box-shadow: inset -3px 0px 4px 0px rgba(0,0,0,0.1); + } + + #navPanel .link + { + display: block; + color: rgba(255,255,255,0.5); + text-transform: uppercase; + text-decoration: none; + font-size: 0.85em; + letter-spacing: 0.15em; + text-decoration: none; + height: 44px; + line-height: 44px; + border-top: solid 1px rgba(255,255,255,0.05); + margin: 0 15px 0 15px; + } + + #navPanel .link:first-child + { + border-top: 0; + } + + #navPanel .indent-1 { display: inline-block; width: 1em; } + #navPanel .indent-2 { display: inline-block; width: 2em; } + #navPanel .indent-3 { display: inline-block; width: 3em; } + #navPanel .indent-4 { display: inline-block; width: 4em; } + #navPanel .indent-5 { display: inline-block; width: 5em; } + #navPanel .depth-0 { color: #fff; } + +/*********************************************************************************/ +/* Wrappers */ +/*********************************************************************************/ + + .wrapper + { + padding: 15px 15px 5em 15px; + } + + .wrapper .title + { + font-size: 0.9em; + width: 18em; + height: 2.5em; + top: -2.5em; + line-height: 2.5em; + margin-bottom: -2.5em; + margin-left: -9em; + padding-top: 0.5em; + } + + .wrapper .title:before, + .wrapper .title:after + { + height: 15px; + bottom: -15px; + background-size: 100% 100%; + } + + #header-wrapper + { + padding: 6em 2em 6em 2em; + } + + #footer-wrapper + { + padding-top: 3em; + } + + #footer-wrapper .feature-list section + { + border-top-color: #eee; + border-top-color: rgba(255,255,255,0.05); + } + +/*********************************************************************************/ +/* Header */ +/*********************************************************************************/ + + #header + { + } + +/*********************************************************************************/ +/* Logo */ +/*********************************************************************************/ + + #logo + { + text-align: center; + } + + #logo h1 + { + font-size: 1.5em; + letter-spacing: 0.2em; + } + + #logo p + { + margin: 1.25em 0 0 0; + display: block; + letter-spacing: 0.2em; + font-size: 0.9em; + } + +/*********************************************************************************/ +/* Nav */ +/*********************************************************************************/ + + #nav + { + display: none; + } + +/*********************************************************************************/ +/* Intro */ +/*********************************************************************************/ + + #intro + { + text-align: center; + padding: 1em 2em 1em 2em !important; + margin: 0 auto; + } + + #intro .style2 + { + font-size: 1.5em; + letter-spacing: 0.05em; + line-height: 1.25em; + padding: 1.25em; + } + +/*********************************************************************************/ +/* Main */ +/*********************************************************************************/ + + #main + { + padding: 1em 0 0 0; + } + +/*********************************************************************************/ +/* Content */ +/*********************************************************************************/ + + #content + { + padding: 0 0 2em 0; + } + + #content header.style1 + { + padding-bottom: 2.5em; + } + +/*********************************************************************************/ +/* Footer */ +/*********************************************************************************/ + + #footer + { + } + + #footer hr + { + display: none; + } + +/*********************************************************************************/ +/* Copyright */ +/*********************************************************************************/ + + #copyright + { + padding: 2em 0 0 0; + } + + #copyright ul + { + padding: 1em 2em; + width: 100%; + } + + #copyright ul li + { + display: block; + margin: 0.5em 0 0 0; + } + + #copyright ul li:first-child + { + margin-top: 0; + } \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/style.css b/exampleAddOns/alarmMonitorWeb/css/style.css new file mode 100644 index 0000000..44b859f --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/style.css @@ -0,0 +1,870 @@ +@charset 'UTF-8'; +@import url('http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,700,900'); +@import url('font-awesome.min.css'); + +/* + Escape Velocity by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +/*********************************************************************************/ +/* Basic */ +/*********************************************************************************/ + + body, input, textarea, select + { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + color: #919499; + } + + body.is-loading * + { + -moz-transition: none !important; + -webkit-transition: none !important; + -o-transition: none !important; + -ms-transition: none !important; + transition: none !important; + -moz-animation: none !important; + -webkit-animation: none !important; + -o-animation: none !important; + -ms-animation: none !important; + animation: none !important; + } + + h1,h2,h3,h4,h5,h6 + { + font-weight: 700; + color: #484d55; + } + + h1 a, h2 a, h3 a, h4 a, h5 a, h6 a + { + color: inherit; + text-decoration: none; + } + + a + { + text-decoration: underline; + color: #717479; + -moz-transition: color .25s ease-in-out; + -webkit-transition: color .25s ease-in-out; + -o-transition: color .25s ease-in-out; + -ms-transition: color .25s ease-in-out; + transition: color .25s ease-in-out; + } + + a:hover + { + text-decoration: none; + } + + strong, b + { + font-weight: 700; + color: #484d55; + } + + blockquote + { + border-left: solid 0.5em #ddd; + padding: 1em 0 1em 2em; + font-style: italic; + } + + em, i + { + font-style: italic; + } + + hr + { + border: 0; + border-top: solid 1px #ddd; + } + + sub + { + position: relative; + top: 0.5em; + font-size: 0.8em; + } + + sup + { + position: relative; + top: -0.5em; + font-size: 0.8em; + } + + .nobr + { + white-space: nowrap; + } + + br.clear + { + clear: both; + } + + p, ul, ol, dl, table, blockquote, form + { + margin-bottom: 2em; + } + + /* Table */ + + table + { + width: 100%; + } + + table.default + { + width: 100%; + } + + table.default tbody tr:nth-child(2n+2) + { + background: #f4f4f4; + } + + table.default td + { + padding: 0.5em 1em 0.5em 1em; + } + + table.default th + { + text-align: left; + font-weight: 400; + padding: 0.5em 1em 0.5em 1em; + } + + table.default thead + { + background: #484d55; + color: #fff; + } + + table.default tfoot + { + background: #eee; + } + + table.default tbody + { + } + + /* Form */ + + form + { + } + + form label + { + display: block; + font-weight: 700; + color: #484d55; + } + + form input[type="text"], + form input[type="email"], + form input[type="password"], + form select, + form textarea + { + -webkit-appearance: none; + display: block; + border: 0; + background: #eee; + box-shadow: inset 0px 0px 1px 0px #a0a1a7; + border-radius: 0.35em; + width: 100%; + padding: 0.75em 1em 0.75em 1em; + -moz-transition: all .25s ease-in-out; + -webkit-transition: all .25s ease-in-out; + -o-transition: all .25s ease-in-out; + -ms-transition: all .25s ease-in-out; + transition: all .25s ease-in-out; + } + + form input[type="text"], + form input[type="email"], + form input[type="password"], + form select + { + line-height: 1em; + } + + form textarea + { + min-height: 10em; + } + + form input[type="text"]:focus, + form input[type="email"]:focus, + form input[type="password"]:focus, + form select:focus, + form textarea:focus + { + background: #f8f8f8; + } + + form .formerize-placeholder + { + color: #555 !important; + font-style: italic; + } + + form ::-webkit-input-placeholder + { + color: #555 !important; + font-style: italic; + line-height: 1.35em; + } + + form :-moz-placeholder + { + color: #555 !important; + font-style: italic; + } + + form ::-moz-placeholder + { + color: #555 !important; + font-style: italic; + } + + form :-ms-input-placeholder + { + color: #555 !important; + font-style: italic; + } + + form ::-moz-focus-inner + { + border: 0; + } + + /* Section/Article */ + + section, + article + { + margin-bottom: 3em; + } + + section > :last-child, + article > :last-child + { + margin-bottom: 0; + } + + section:last-child, + article:last-child + { + margin-bottom: 0; + } + + header.style1 + { + text-align: center; + } + + header.style1 h2 + { + font-weight: 700; + } + + header.style1 p + { + color: #b1b4b9; + } + + /* Image */ + + .image + { + display: inline-block; + } + + .image img + { + display: block; + width: 100%; + } + + .image.fit + { + display: block; + width: 100%; + } + + .image.left + { + float: left; + margin: 0 2em 2em 0; + } + + .image.centered + { + display: block; + margin: 0 0 2em 0; + } + + .image.centered img + { + margin: 0 auto; + width: auto; + } + + .image.featured + { + display: block; + width: 100%; + margin: 0 0 2em 0; + } + + /* Button */ + + input[type="button"], + input[type="submit"], + input[type="reset"], + .button + { + display: inline-block; + background: #444; + text-align: center; + text-transform: uppercase; + font-weight: 700; + letter-spacing: 0.25em; + text-decoration: none; + border-radius: 0.35em; + border: 0; + outline: 0; + cursor: pointer; + -moz-transition: all .25s ease-in-out; + -webkit-transition: all .25s ease-in-out; + -o-transition: all .25s ease-in-out; + -ms-transition: all .25s ease-in-out; + transition: all .25s ease-in-out; + } + + input[type="button"].style1, + input[type="submit"].style1, + input[type="reset"].style1, + .button.style1 + { + background: #e97770 url('images/overlay.png'); + color: #fff; + } + + input[type="button"].style1:hover, + input[type="submit"].style1:hover, + input[type="reset"].style1:hover, + .button.style1:hover + { + background-color: #f98780; + } + + input[type="button"].style1:active, + input[type="submit"].style1:active, + input[type="reset"].style1:active, + .button.style1:active + { + background-color: #d96760; + } + + input[type="button"].style2, + input[type="submit"].style2, + input[type="reset"].style2, + .button.style2 + { + background: none; + color: #606167; + box-shadow: inset 0px 0px 2px 0px #a0a1a7; + } + + input[type="button"].style2:hover, + input[type="submit"].style2:hover, + input[type="reset"].style2:hover, + .button.style2:hover + { + box-shadow: inset 0px 0px 2px 0px #606167; + } + + input[type="button"].style2:active, + input[type="submit"].style2:active, + input[type="reset"].style2:active, + .button.style2:active + { + box-shadow: inset 0px 0px 2px 0px #202127; + } + + input[type="button"].style3, + input[type="submit"].style3, + input[type="reset"].style3, + .button.style3 + { + background: #2f333b url('images/overlay.png'); + color: #fff; + } + + input[type="button"].style3:hover, + input[type="submit"].style3:hover, + input[type="reset"].style3:hover, + .button.style3:hover + { + background-color: #3f434b; + } + + input[type="button"].style3:active, + input[type="submit"].style3:active, + input[type="reset"].style3:active, + .button.style3:active + { + background-color: #1f232b; + } + + /* List */ + + ul.default + { + list-style: disc; + padding-left: 1em; + } + + ul.default li + { + padding-left: 0.5em; + } + + ul.style2 + { + } + + ul.style2 li + { + border-top: solid 1px #eee; + padding: 1.5em 0 0 0; + margin: 1.5em 0 0 0; + } + + ul.style2 li:first-child + { + border-top: 0; + padding-top: 0; + margin-top: 0; + } + + ul.style3 + { + } + + ul.style3 li + { + border-top: solid 1px #eee; + padding: 0.5em 0 0 0; + margin: 0.5em 0 0 0; + } + + ul.style3 li:first-child + { + border-top: 0; + padding-top: 0; + margin-top: 0; + } + + ol + { + } + + ol.default + { + list-style: decimal; + padding-left: 1.25em; + } + + ol.default li + { + padding-left: 0.25em; + } + + /* Feature List */ + + .feature-list + { + } + + .feature-list h3 + { + color: #e97770 !important; + } + + .feature-list h3:before + { + position: relative; + display: inline-block; + color: #fff; + background: #2f333b url('images/overlay.png'); + border-radius: 1em; + text-align: center; + } + +/*********************************************************************************/ +/* Icons */ +/*********************************************************************************/ + + .icon { + text-decoration: none; + } + + .icon:before { + display: inline-block; + font-family: FontAwesome; + font-size: 1.25em; + text-decoration: none; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale; + } + + .icon > .label { + display: none; + } + +/*********************************************************************************/ +/* Wrappers */ +/*********************************************************************************/ + + .wrapper + { + position: relative; + } + + .wrapper .title + { + position: absolute; + top: 0; + left: 50%; + text-align: center; + text-transform: uppercase; + display: block; + font-weight: 700; + letter-spacing: 0.25em; + } + + .wrapper .title:before + { + content: ''; + position: absolute; + bottom: -38px; + left: -35px; + width: 35px; + height: 38px; + background: url('images/shadow.png'); + } + + .wrapper .title:after + { + content: ''; + position: absolute; + bottom: -38px; + right: -35px; + width: 35px; + height: 38px; + background: url('images/shadow.png'); + -moz-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + -o-transform: scaleX(-1); + -ms-transform: scaleX(-1); + transform: scaleX(-1); + } + + .wrapper.style1 + { + background: #e97770 url('images/overlay.png'); + color: #eee; + color: rgba(255,255,255,0.75); + } + + .wrapper.style1 .title + { + background: #e97770 url('images/overlay.png'); + color: #fff; + } + + .wrapper.style1 h1, + .wrapper.style1 h2, + .wrapper.style1 h3, + .wrapper.style1 h4, + .wrapper.style1 h5, + .wrapper.style1 h6, + .wrapper.style1 strong, + .wrapper.style1 b, + .wrapper.style1 a + { + color: #fff; + } + + .wrapper.style2 + { + background: #fff; + } + + .wrapper.style2 .title + { + background: #fff; + color: #484d55; + } + + .wrapper.style3 + { + background: #f3f3f3 url('images/overlay.png'); + } + + .wrapper.style3 .title + { + background: #f3f3f3 url('images/overlay.png'); + color: #484d55; + } + + .wrapper.style3 .image + { + border: solid 10px #fff; + } + + #header-wrapper + { + background: url('../images/banner.jpg') center center; + background-size: cover; + } + + #header-wrapper:before + { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: url('images/overlay.png'); + } + + #footer-wrapper + { + background: #282b34 url('images/overlay.png'); + color: #eee; + color: rgba(255,255,255,0.5); + } + + #footer-wrapper h1, + #footer-wrapper h2, + #footer-wrapper h3, + #footer-wrapper h4, + #footer-wrapper h5, + #footer-wrapper h6, + #footer-wrapper strong, + #footer-wrapper b, + #footer-wrapper a + { + color: #fff; + } + + #footer-wrapper hr + { + border-top-color: #333; + border-top-color: rgba(255,255,255,0.05); + } + + #footer-wrapper form + { + } + + #footer-wrapper form input[type="text"], + #footer-wrapper form input[type="email"], + #footer-wrapper form input[type="password"], + #footer-wrapper form select, + #footer-wrapper form textarea + { + background: #ccc; + box-shadow: none; + } + + #footer-wrapper form input[type="text"]:focus, + #footer-wrapper form input[type="email"]:focus, + #footer-wrapper form input[type="password"]:focus, + #footer-wrapper form select:focus, + #footer-wrapper form textarea:focus + { + background: #fff; + } + + #footer-wrapper input[type="button"].style2, + #footer-wrapper input[type="submit"].style2, + #footer-wrapper input[type="reset"].style2, + #footer-wrapper .button.style2 + { + color: #aaa; + box-shadow: inset 0px 0px 2px 0px rgba(255,255,255,0.5); + } + + #footer-wrapper input[type="button"].style2:hover, + #footer-wrapper input[type="submit"].style2:hover, + #footer-wrapper input[type="reset"].style2:hover, + #footer-wrapper .button.style2:hover + { + color: #ccc; + box-shadow: inset 0px 0px 2px 0px rgba(255,255,255,0.65); + } + + #footer-wrapper input[type="button"].style2:active, + #footer-wrapper input[type="submit"].style2:active, + #footer-wrapper input[type="reset"].style2:active, + #footer-wrapper .button.style2:active + { + box-shadow: inset 0px 0px 2px 0px rgba(255,255,255,0.75); + } + + #footer-wrapper .title + { + background: #282b34 url('images/overlay.png'); + color: #eee; + } + + #footer-wrapper header.style1 + { + } + + #footer-wrapper header.style1 h2 + { + color: #fff; + } + + #footer-wrapper header.style1 .p + { + color: inherit; + } + + #footer-wrapper .feature-list + { + } + + #footer-wrapper .feature-list section + { + border-top-color: #333; + border-top-color: rgba(255,255,255,0.05); + } + + #footer-wrapper .feature-list h3 + { + } + + #footer-wrapper .feature-list h3:before + { + background: #3d4249 url('images/overlay.png'); + } + +/*********************************************************************************/ +/* Logo */ +/*********************************************************************************/ + + #logo + { + } + + #logo h1 + { + font-weight: 900; + text-transform: uppercase; + color: #fff; + } + + #logo p + { + color: #eee; + color: rgba(255,255,255,0.5); + text-transform: uppercase; + } + +/*********************************************************************************/ +/* Intro */ +/*********************************************************************************/ + + #intro + { + } + + #intro > .style1 + { + } + + #intro > .style2 + { + font-weight: 700; + color: #fff; + border-radius: 0.35em; + box-shadow: inset 0px 0px 1px 1px rgba(255,255,255,0.25); + } + + #intro > .style2 a + { + color: inherit; + text-decoration: none; + } + + #intro > .style3 + { + } + +/*********************************************************************************/ +/* Highlights */ +/*********************************************************************************/ + + #highlights + { + } + + #highlights .highlight + { + text-align: center; + } + + #highlights .highlight h3 + { + color: #e97770; + } + +/*********************************************************************************/ +/* Copyright */ +/*********************************************************************************/ + + #copyright + { + text-align: center; + } + + #copyright ul + { + display: inline-block; + border-radius: 0.35em; + box-shadow: inset 0px 0px 1px 1px rgba(255,255,255,0.05); + color: #aaa; + color: rgba(255,255,255,0.25); + } + + #copyright a + { + color: inherit; + } + + #copyright a:hover + { + color: #fff; + } \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/css/usermod.css b/exampleAddOns/alarmMonitorWeb/css/usermod.css new file mode 100644 index 0000000..c18adbb --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/css/usermod.css @@ -0,0 +1,7 @@ +#highlights { + text-align: left; + width: 95%; + padding: 10px auto; + font-size: 90%; + } + \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/eintragen.html b/exampleAddOns/alarmMonitorWeb/eintragen.html new file mode 100644 index 0000000..b850f57 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/eintragen.html @@ -0,0 +1,111 @@ + + + + + +einloggen"; + exit; + } +?> + + + + + + BOSwatch + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
Usermanagment
+
+ +
+ +
+Username:
+
+ +Passwort:
+
+ +Passwort wiederholen:
+
+ + +
+ +
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/eintragen.php b/exampleAddOns/alarmMonitorWeb/eintragen.php new file mode 100644 index 0000000..22488dc --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/eintragen.php @@ -0,0 +1,58 @@ + + + + + + + + +Zurück"; + exit; + } +$passwort = md5($passwort); + +$result = mysql_query("SELECT id FROM login WHERE username LIKE '$username'"); +$menge = mysql_num_rows($result); + +if($menge == 0) + { + $eintrag = "INSERT INTO login (username, passwort) VALUES ('$username', '$passwort')"; + $eintragen = mysql_query($eintrag); + + if($eintragen == true) + { + echo "Benutzername $username wurde erstellt. Login"; + } + else + { + echo "Fehler beim Speichern des Benutzernames. Zurück"; + } + + + } + +else + { + echo "Benutzername schon vorhanden. Zurück"; + } +?> diff --git a/exampleAddOns/alarmMonitorWeb/fonts/FontAwesome.otf b/exampleAddOns/alarmMonitorWeb/fonts/FontAwesome.otf new file mode 100644 index 0000000..81c9ad9 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/fonts/FontAwesome.otf differ diff --git a/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.eot b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..84677bc Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.eot differ diff --git a/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.svg b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..d907b25 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.svg @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.ttf b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..96a3639 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.ttf differ diff --git a/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.woff b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..628b6a5 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/fonts/fontawesome-webfont.woff differ diff --git a/exampleAddOns/alarmMonitorWeb/images/banner.jpg b/exampleAddOns/alarmMonitorWeb/images/banner.jpg new file mode 100644 index 0000000..1774bac Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/banner.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic01.jpg b/exampleAddOns/alarmMonitorWeb/images/pic01.jpg new file mode 100644 index 0000000..2600092 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic01.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic02.jpg b/exampleAddOns/alarmMonitorWeb/images/pic02.jpg new file mode 100644 index 0000000..86795de Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic02.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic03.jpg b/exampleAddOns/alarmMonitorWeb/images/pic03.jpg new file mode 100644 index 0000000..5670469 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic03.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic04.jpg b/exampleAddOns/alarmMonitorWeb/images/pic04.jpg new file mode 100644 index 0000000..40dfdef Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic04.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic05.jpg b/exampleAddOns/alarmMonitorWeb/images/pic05.jpg new file mode 100644 index 0000000..710401c Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic05.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic06.jpg b/exampleAddOns/alarmMonitorWeb/images/pic06.jpg new file mode 100644 index 0000000..8a64906 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic06.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic07.jpg b/exampleAddOns/alarmMonitorWeb/images/pic07.jpg new file mode 100644 index 0000000..b530a9d Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic07.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic08.jpg b/exampleAddOns/alarmMonitorWeb/images/pic08.jpg new file mode 100644 index 0000000..99a07cb Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic08.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic09.jpg b/exampleAddOns/alarmMonitorWeb/images/pic09.jpg new file mode 100644 index 0000000..8672dad Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic09.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/images/pic10.jpg b/exampleAddOns/alarmMonitorWeb/images/pic10.jpg new file mode 100644 index 0000000..fab46e4 Binary files /dev/null and b/exampleAddOns/alarmMonitorWeb/images/pic10.jpg differ diff --git a/exampleAddOns/alarmMonitorWeb/index.php b/exampleAddOns/alarmMonitorWeb/index.php new file mode 100644 index 0000000..c6165ce --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/index.php @@ -0,0 +1,103 @@ + + + + + + + + BOSwatch + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
LOGIN
+
+ +
+
+

Bitte melden sie sich an!



+Username:
+

+ +Dein Passwort:
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+
+
+ + + + + + \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/js/init.js b/exampleAddOns/alarmMonitorWeb/js/init.js new file mode 100644 index 0000000..b291217 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/js/init.js @@ -0,0 +1,86 @@ +/* + Escape Velocity by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +(function($) { + + skel.init({ + reset: 'full', + breakpoints: { + 'global': { range: '*', href: 'css/style.css' }, + 'desktop': { range: '737-', href: 'css/style-desktop.css', containers: 1200, grid: { gutters: 50 } }, + '1000px': { range: '737-1200', href: 'css/style-1000px.css', containers: 1000, grid: { gutters: 35 }, viewport: { width: 1080 } }, + 'mobile': { range: '-736', href: 'css/style-mobile.css', containers: '100%!', grid: { collapse: true, gutters: 20 }, viewport: { scalable: false } } + }, + plugins: { + layers: { + navPanel: { + hidden: true, + breakpoints: 'mobile', + position: 'top-left', + side: 'left', + animation: 'pushX', + width: '80%', + height: '100%', + clickToHide: true, + html: '
', + orientation: 'vertical' + }, + titleBar: { + breakpoints: 'mobile', + position: 'top-left', + side: 'top', + height: 44, + width: '100%', + html: '' + } + } + } + }); + + $(function() { + + var $window = $(window), + $body = $('body'); + + // Disable animations/transitions until the page has loaded. + $body.addClass('is-loading'); + + $window.on('load', function() { + $body.removeClass('is-loading'); + }); + + // Forms (IE<10). + var $form = $('form'); + if ($form.length > 0) { + + $form.find('.form-button-submit') + .on('click', function() { + $(this).parents('form').submit(); + return false; + }); + + if (skel.vars.IEVersion < 10) { + $.fn.n33_formerize=function(){var _fakes=new Array(),_form = $(this);_form.find('input[type=text],textarea').each(function() { var e = $(this); if (e.val() == '' || e.val() == e.attr('placeholder')) { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).blur(function() { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).focus(function() { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); _form.find('input[type=password]').each(function() { var e = $(this); var x = $($('
').append(e.clone()).remove().html().replace(/type="password"/i, 'type="text"').replace(/type=password/i, 'type=text')); if (e.attr('id') != '') x.attr('id', e.attr('id') + '_fakeformerizefield'); if (e.attr('name') != '') x.attr('name', e.attr('name') + '_fakeformerizefield'); x.addClass('formerize-placeholder').val(x.attr('placeholder')).insertAfter(e); if (e.val() == '') e.hide(); else x.hide(); e.blur(function(event) { event.preventDefault(); var e = $(this); var x = e.parent().find('input[name=' + e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } }); x.focus(function(event) { event.preventDefault(); var x = $(this); var e = x.parent().find('input[name=' + x.attr('name').replace('_fakeformerizefield', '') + ']'); x.hide(); e.show().focus(); }); x.keypress(function(event) { event.preventDefault(); x.val(''); }); }); _form.submit(function() { $(this).find('input[type=text],input[type=password],textarea').each(function(event) { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) e.attr('name', ''); if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); }).bind("reset", function(event) { event.preventDefault(); $(this).find('select').val($('option:first').val()); $(this).find('input,textarea').each(function() { var e = $(this); var x; e.removeClass('formerize-placeholder'); switch (this.type) { case 'submit': case 'reset': break; case 'password': e.val(e.attr('defaultValue')); x = e.parent().find('input[name=' + e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } else { e.show(); x.hide(); } break; case 'checkbox': case 'radio': e.attr('checked', e.attr('defaultValue')); break; case 'text': case 'textarea': e.val(e.attr('defaultValue')); if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } break; default: e.val(e.attr('defaultValue')); break; } }); window.setTimeout(function() { for (x in _fakes) _fakes[x].trigger('formerize_sync'); }, 10); }); return _form; }; + $form.n33_formerize(); + } + + } + + // CSS polyfills (IE<9). + if (skel.vars.IEVersion < 9) + $(':last-child').addClass('last-child'); + + // Dropdowns. + $('#nav > ul').dropotron({ + mode: 'fade', + noOpenerFade: true, + alignment: 'center', + detach: false + }); + + }); + +})(jQuery); \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/js/jquery.dropotron.min.js b/exampleAddOns/alarmMonitorWeb/js/jquery.dropotron.min.js new file mode 100644 index 0000000..74fde86 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/js/jquery.dropotron.min.js @@ -0,0 +1,2 @@ +/* jquery.dropotron.js v1.4.3 | (c) n33 | n33.co | MIT licensed */ +(function(e){var t="openerActiveClass",n="click touchend",r="left",i="doCollapseAll",s="position",o="trigger",u="disableSelection_dropotron",a="addClass",f="doCollapse",l=!1,c="outerWidth",h="removeClass",p="preventDefault",d="length",v="dropotron",m="clearTimeout",g="right",y="parent",b=!0,w="speed",E="none",S="stopPropagation",x="doExpand",T=":visible",N="absolute",C="css",k="center",L="toggle",A="baseZIndex",O="offsetX",M="alignment",_="submenuClassPrefix",D="children",P="hover",H="relative",B="doToggle",j="ul",F="z-index",I="opacity",q="find",R="opener",U="px",z=null,W="hide",X="offset",V="detach",$="fast";e.fn[u]=function(){return e(this)[C]("user-select",E)[C]("-khtml-user-select",E)[C]("-moz-user-select",E)[C]("-o-user-select",E)[C]("-webkit-user-select",E)},e.fn[v]=function(t){var n;if(this[d]==0)return e(this);if(this[d]>1)for(n=0;n0&&i.add(d).on("mouseleave",function(){window[m](at),at=window.setTimeout(function(){i[o](f)},et.hideDelay)}),i[u]()[W]()[a](et.menuClass)[C](s,N).on("mouseenter",function(){window[m](at)}).on(x,function(){var n,u,p,v,E,S,x,_,D,P,B;if(i.is(T))return l;window[m](at),nt.each(function(){var t=e(this);e.contains(t.get(0),d.get(0))||t[o](f)}),n=d[X](),u=d[s](),p=d[y]()[s](),v=d[c](),E=i[c](),S=i[C](F)==et[A];if(S){et[V]?x=n:x=u,P=x.top+d.outerHeight()+et.globalOffsetY,_=et[M],i[h](r)[h](g)[h](k);switch(et[M]){case g:D=x[r]-E+v,D<0&&(D=x[r],_=r);break;case k:D=x[r]-Math.floor((E-v)/2),D<0?(D=x[r],_=r):D+E>st.width()&&(D=x[r]-E+v,_=g);break;case r:default:D=x[r],D+E>st.width()&&(D=x[r]-E+v,_=g)}i[a](_)}else{d[C](s)==H||d[C](s)==N?(P=et.offsetY,D=-1*u[r]):(P=u.top+et.offsetY,D=0);switch(et[M]){case g:D+=-1*d[y]()[c]()+et[O];break;case k:case r:default:D+=d[y]()[c]()+et[O]}}navigator.userAgent.match(/MSIE ([0-9]+)\./)&&RegExp.$1<8&&(D+=et.IEOffsetX,P+=et.IEOffsetY),i[C](r,D+U)[C]("top",P+U)[C](I,"0.01").show(),B=l,d[C](s)==H||d[C](s)==N?D=-1*u[r]:D=0,i[X]()[r]<0?(D+=d[y]()[c]()-et[O],B=b):i[X]()[r]+E>st.width()&&(D+=-1*d[y]()[c]()-et[O],B=b),B&&i[C](r,D+U),i[W]()[C](I,"1");switch(et.mode){case"zoom":ot=b,d[a](et[t]),i.animate({width:L,height:L},et[w],et.easing,function(){ot=l});break;case"slide":ot=b,d[a](et[t]),i.animate({height:L},et[w],et.easing,function(){ot=l});break;case"fade":ot=b,S&&!et.noOpenerFade?(et[w]=="slow"?B=80:et[w]==$?B=40:B=Math.floor(et[w]/2),d.fadeTo(B,.01,function(){d[a](et[t]),d.fadeTo(et[w],1),i.fadeIn(et[w],function(){ot=l})})):(d[a](et[t]),d.fadeTo(et[w],1),i.fadeIn(et[w],function(){ot=l}));break;case"instant":default:d[a](et[t]),i.show()}return l}).on(f,function(){return i.is(T)?(i[W](),d[h](et[t]),i[q]("."+et[t])[h](et[t]),i[q](j)[W](),l):l}).on(B,function(){return i.is(T)?i[o](f):i[o](x),l}),d[u]()[a](R)[C]("cursor","pointer").on(n,function(e){if(ot)return;e[p](),e[S](),i[o](B)}),et.expandMode==P&&d[P](function(){if(ot)return;ut=window.setTimeout(function(){i[o](x)},et.hoverDelay)},function(){window[m](ut)})}),nt[q]("a")[C]("display","block").on(n,function(t){if(ot)return;e(this).attr("href")[d]<1&&t[p]()}),tt[q]("li")[C]("white-space","nowrap").each(function(){var t=e(this),r=t[D]("a"),s=t[D](j),u=r.attr("href");r.on(n,function(e){u[d]==0||u=="#"?e[p]():e[S]()}),r[d]>0&&s[d]==0&&t.on(n,function(e){if(ot)return;tt[o](i),e[S]()})}),tt[D]("li").each(function(){var t,n,r,i,s=e(this),o=s[D](j);if(o[d]>0){et[V]&&(et.cloneOnDetach&&(t=o.clone(),t.attr("class","")[W]().appendTo(o[y]())),o[V]().appendTo(rt));for(n=et[A],r=1,i=o;i[d]>0;r++)i[C](F,n++),et[_]&&i[a](et[_]+(n-1-et[A])),i=i[q]("> li > ul")}}),st.on("scroll",function(){tt[o](i)}).on("keypress",function(e){!ot&&e.keyCode==27&&(e[p](),tt[o](i))}),it.on(n,function(){ot||tt[o](i)})}})(jQuery); \ No newline at end of file diff --git a/exampleAddOns/alarmMonitorWeb/js/jquery.min.js b/exampleAddOns/alarmMonitorWeb/js/jquery.min.js new file mode 100644 index 0000000..ab28a24 --- /dev/null +++ b/exampleAddOns/alarmMonitorWeb/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("