From dd8ba21f26921e4715765b087bd48f556974dccb Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 13 Nov 2014 21:33:23 +0100 Subject: [PATCH] Webbuild integration --- cgi-bin/webbuild | 2202 +++++++++++++++++++++++++++++ cgi-bin/webbuild-buildvm01.cgi | 19 + cgi-bin/webbuild-buildvm02.cgi | 19 + cgi-bin/webbuild-webbuild-arm.cgi | 19 + functions.php | 16 +- header-webbuild.php | 143 ++ images/fail.png | Bin 0 -> 894 bytes images/inprogress.gif | Bin 0 -> 537 bytes images/ok.png | Bin 0 -> 927 bytes images/wait.gif | Bin 0 -> 5672 bytes images/webbuild.ico | Bin 0 -> 1150 bytes images/webbuild.png | Bin 0 -> 1856 bytes scripts/jquery.js | 154 ++ scripts/jquery.jscrollpane.css | 120 ++ scripts/jquery.jscrollpane.min.js | 11 + scripts/jquery.mousewheel.js | 84 ++ scripts/socialbox.js | 109 ++ style.css | 2 +- styles/webbuild-post.css | 66 + styles/webbuild.css | 318 +++++ webbuild-page.php | 70 + webbuild.html.inc | 43 + webbuild.js.inc | 220 +++ 23 files changed, 3613 insertions(+), 2 deletions(-) create mode 100755 cgi-bin/webbuild create mode 100755 cgi-bin/webbuild-buildvm01.cgi create mode 100755 cgi-bin/webbuild-buildvm02.cgi create mode 100755 cgi-bin/webbuild-webbuild-arm.cgi create mode 100644 header-webbuild.php create mode 100644 images/fail.png create mode 100644 images/inprogress.gif create mode 100644 images/ok.png create mode 100644 images/wait.gif create mode 100644 images/webbuild.ico create mode 100644 images/webbuild.png create mode 100644 scripts/jquery.js create mode 100644 scripts/jquery.jscrollpane.css create mode 100644 scripts/jquery.jscrollpane.min.js create mode 100644 scripts/jquery.mousewheel.js create mode 100644 scripts/socialbox.js create mode 100644 styles/webbuild-post.css create mode 100644 styles/webbuild.css create mode 100644 webbuild-page.php create mode 100644 webbuild.html.inc create mode 100644 webbuild.js.inc diff --git a/cgi-bin/webbuild b/cgi-bin/webbuild new file mode 100755 index 0000000..84e22c6 --- /dev/null +++ b/cgi-bin/webbuild @@ -0,0 +1,2202 @@ +#!/bin/bash +# +# webbuild cgi script +# Copyright (c) 2012-2013 by Silvan Calarco +# +. /usr/share/autodist/webbuild-functions +. /usr/share/autodist/webbuild-functions-private + +AUTOSPEC_CMD="autospec --colors web" +# register all GET and POST variables +cgi_getvars BOTH ALL + +#[ "$PACKAGE" ] && PACKAGEENCODED=`cgi_encodevar "$PACKAGE"` || PACKAGEENCODED= +[ "$PACKAGE" ] && PACKAGEENCODED=`cgi_encodevar "$PACKAGE"` || PACKAGEENCODED= + +#cgi_getvars POST +if [ "$REQUEST" != "refresh" ]; then +# echo "`date` - $QUERY_STRING_POST" >> $LOG + echo "`date` - USER=$USER&REQUEST=$REQUEST&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGE&MAINTAINERMODE=$MAINTAINERMODE" >> $LOG +fi + +# read configuration after cgi_getvars to prevent variables overriding +. /etc/sysconfig/autoport + +if [ "$REQUEST" != "rpmmanagerdownload" ]; then + echo -e "Content-type: text/xml\nPragma: no-cache\n" + echo -n "" +fi + +# SECURITY +USER_ENABLED= +USER_ADMIN= +USER_CANMAINTAIN= +USER_CANSENDMESSAGES= +USER=${USER/.*\/} + +if [ "$REMOTE_ADDR" = "127.0.0.1" -a "$USER" = "" ]; then + USER=admin +fi +if [ "$USER" ]; then + if [ -r "$WEBBUILD_STATEDIR/users/$USER.conf" ]; then + . $WEBBUILD_STATEDIR/users/$USER.conf + fi + if [ "$USER_ENABLED" ]; then + if [ "$USER_EMAIL" ]; then + grep "USER_EMAIL=" $WEBBUILD_STATEDIR/users/$USER.conf >/dev/null || + echo "USER_EMAIL=$USER_EMAIL" >> $WEBBUILD_STATEDIR/users/$USER.conf + fi + USER_ENABLED= + if [ "$SECRET" = "$USER_SECRET" ]; then + [ "$REMOTE_ADDR" = "127.0.0.1" -o "$USER_SECRET" ] && USER_ENABLED=1 || USER_ENABLED= + elif [ "$REQUEST" = "password" ]; then + if [ "$USER_SECRET" ]; then + /usr/libexec/webbuild-checkpassword "$PASSWORD" "$USER_SECRET" 2>/dev/null + else + /usr/libexec/webbuild-checkpassword "$PASSWORD" "$SECRET" 2>/dev/null + fi + if [ $? -eq 0 ]; then + if [ ! "$USER_SECRET" ]; then + tmpfile=`mktemp --suffix=webbuildtmp` + cat $WEBBUILD_STATEDIR/users/$USER.conf > $tmpfile + echo "USER_SECRET='$SECRET'" >> $tmpfile + $SUDO_WRAPPER 0 local "$USER" "" "mv $tmpfile $WEBBUILD_STATEDIR/users/$USER.conf" + fi + USER_ENABLED=1 + else + USER_ENABLED= + fi + elif [ "$REQUEST" != "refresh" ]; then + # no "$USER_SECRET" set; require password + echo -n "" + echo -n " " + echo -n "]]>" + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n "" + exit + fi + fi +elif [ "$REQUEST" != "refresh" ]; then + echo -n "" + echo -n " " + echo -n "]]>" + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n "" + exit +fi + +if [ "$USER_ENABLED" != "1" -a "$REQUEST" != "refresh" ]; then + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n " " + if [ "$USER" ]; then + if [ "$REQUEST" = "enablerequest" ]; then + echo "REQUEST_DATE=\"`date`\" REQUEST_USER=$USER REQUEST_USER_EMAIL=$USER_EMAIL REQUEST_TYPE=$REQUEST REQUEST_SECRET='$SECRET'" >> $WEBBUILD_STATEDIR/requests + echo -n "Your request has been submitted. Please wait for approval and retry later." + elif [ "$REQUEST" = "password" ]; then + echo -n "Invalid password. Please reload and retry or ask the maintainer in case of problems." + elif [ "`grep \" REQUEST_USER=$USER \" $WEBBUILD_STATEDIR/requests`" ]; then + echo -n "Your request is pending for approval. Please try again later or ask the maintainer in case of problems." + else + echo -n "" + echo -n "]]>" + fi +# else +# echo -n "Unauthorized!" + fi + echo -n " " + echo -n "" + exit +fi + +if [ -e $WEBBUILD_STATEDIR/webbuild.state ]; then + . $WEBBUILD_STATEDIR/users/webbuild.state +else + touch $WEBBUILD_STATEDIR/users/webbuild.state +fi + +if [ "$USER_ADMIN" -a "$FAKEUSERSWITCH" != "" ]; then + if [ "$FAKEUSERSWITCH" = "_disabled_" ]; then + set_user_state_var STATE_FAKEUSER + FAKEUSER= + else + set_user_state_var STATE_FAKEUSER $FAKEUSERSWITCH + fi +fi + +if [ "$USER" -a "$USER_ENABLED" ]; then + # set user state changes + if [ "$AUTODISTCURRENT" != "" ]; then + if [ "$AUTODISTCURRENT" = "true" ]; then + set_user_state_var STATE_AUTODISTCURRENT 1 + else + set_user_state_var STATE_AUTODISTCURRENT 0 + fi + fi + if [ "$ADVANCEDCONTROLSSWITCH" != "" ]; then + if [ "$ADVANCEDCONTROLSSWITCH" = "true" ]; then + set_user_state_var STATE_ADVANCEDCONTROLS 1 + else + set_user_state_var STATE_ADVANCEDCONTROLS + fi + fi + if [ "$PRIVACYMODESWITCH" != "" ]; then + if [ "$PRIVACYMODESWITCH" = "true" ]; then + set_user_state_var STATE_PRIVACYMODE 1 + else + set_user_state_var STATE_PRIVACYMODE + fi + fi + if [ "$JOBSSHOWALL" != "" ]; then + if [ "$JOBSSHOWALL" = "true" ]; then + set_user_state_var STATE_JOBSSHOWALL 1 + else + set_user_state_var STATE_JOBSSHOWALL + fi + fi + + # read user state file + [ -e $WEBBUILD_STATEDIR/users/$USER.state ] && . $WEBBUILD_STATEDIR/users/$USER.state + + if [ "$USER_ADMIN" -a "$STATE_FAKEUSER" != "" ]; then + USER=$STATE_FAKEUSER + USER_ENABLED= + USER_ADMIN= + USER_CANMAINTAIN= + USER_CANINSTALL= + USER_ALLENVIRONMENTS= + USER_ALLREPOSITORIES= + [ -e $WEBBUILD_STATEDIR/users/$USER.conf ] && . $WEBBUILD_STATEDIR/users/$USER.conf + STATE_ADVANCEDCONTROLS= + [ -e $WEBBUILD_STATEDIR/users/$USER.state ] && . $WEBBUILD_STATEDIR/users/$USER.state + fi +else + USER= +fi + +# +# Public requests +# +if [ "$REQUEST" = "refresh" -o ! "$USER" ]; then + [ -e "$WEBBUILD_STATEDIR/social_log" ] || exit + # social box + echo -n "" + count=0 + if [ ! "$FROMID" -o "$FROMID" = "0" -o "$FROMID" = "NaN" ]; then + if [ "$USER" ]; then + line=`tail -n 500 $WEBBUILD_STATEDIR/social_log | grep -v " SUSER=$USER " 2>/dev/null | tail -n 25 | head -n 1` + else + line=`tail -n 500 $WEBBUILD_STATEDIR/social_log | grep -v " STARGET=developers " 2>/dev/null | tail -n 25 | head -n 1` + fi + eval $line + FROMID=$SID + fi + tail -n 100 $WEBBUILD_STATEDIR/social_log | while read line; do + STYPE= + SPRIVACY= + SUSER= + STARGET= + SID= + eval $line + [ "$SID" ] || continue + [ $SID -ge $FROMID ] || continue + [ "$STARGET" = "developers" -a ! "$USER" ] && continue + [ "$SUSER" = "$USER" -a "$STARGET" == "developers" ] && continue + if [ "$SPRIVACY" -a ! "$USER" ]; then + USER_GRAVATAR= + else + USER_GRAVATAR=`echo -n $SEMAIL | md5sum | sed "s| .*||"` + fi + echo -n "
" + echo -n "
" + if [ "$SPRIVACY" -a ! "$USER" ]; then + SUSER="a developer" + elif [ "$USER" = "$SUSER" ]; then + SUSER="you" + fi + echo -n "
$SUSER $STEXT
" + echo -n "

]]>
" + count=$(($count + 1)) + done + echo -n "
" +fi + +if [ "$USER_ENABLED" != "1" ]; then + echo -n "" + exit +fi + +# +# Enabled users requests +# + +rm -f $WEBBUILD_STATEDIR/cache/config-dynamic +if [ "${#AUTOPORT_ARCH[*]}" = "0" ]; then + LOCAL_PACKAGER_USERS=`getent group packager | cut -d: -f4 | tr , ' '` + LOCAL_ARCH=`uname -m` + case $LOCAL_ARCH in + i386|i486|i686|athlon) LOCAL_ARCH="i586" ;; + esac + i=0 + for u in $LOCAL_PACKAGER_USERS; do + cat >> $WEBBUILD_STATEDIR/cache/config-dynamic << _EOF +AUTOPORT_DISABLE[$i]=1 +AUTOPORT_CHROOT_USER[$i]=$u +AUTOPORT_NATIVE[$i]=1 +AUTOPORT_ARCH[$i]="$LOCAL_ARCH" +_EOF + i=$((i + 1)) + done + . $WEBBUILD_STATEDIR/cache/config-dynamic +fi + + +if [ "$REQUEST" = "rpmmanagerdownload" ]; then + resolve_rpmmanagerdir "$RPMMANAGERDIR" "${AUTOPORT_ARCH[$ENVIRONMENT]}" "$REPOSITORY" + for f in $RPMMANAGERPACKAGES; do + installpackages="$installpackages $rpmmanagerdir/$f" + done + if [ "$rpmmanagermode" = "environment" ]; then + download_file $ENVIRONMENT "$installpackages" + else + download_file "" "$installpackages" + fi + RET=$? + exit +fi + +# delete a note +if [ "$REQUEST" = "removenote" ]; then + if [ "$USER" = "$NOTEUSER" -o "$USER_ADMIN" ]; then + [ -e $WEBBUILD_STATEDIR/notes/$PACKAGE.notes ] || break + sed -i "/^$NOTEDATE $NOTEUSER /d" $WEBBUILD_STATEDIR/notes/$PACKAGE.notes + [ ! -s $WEBBUILD_STATEDIR/notes/$PACKAGE.notes ] && rm -f $WEBBUILD_STATEDIR/notes/$PACKAGE.notes + fi + echo -n "" + exit +fi + +# enable user +if [ "$USER_ADMIN" -a "$REQUEST" = "enableuser" ]; then + if [ ! -e $WEBBUILD_STATEDIR/users/$REQUEST_USER.conf ]; then + if [ "$REQUEST_ACCEPT" = "true" ]; then + cat >> $WEBBUILD_STATEDIR/users/$REQUEST_USER.conf << _EOF +USER_ENABLED=1 +USER_SECRET='$REQUEST_SECRET' +USER_EMAIL='$REQUEST_USER_EMAIL' +_EOF + else + cat >> $WEBBUILD_STATEDIR/users/$REQUEST_USER.conf << _EOF +USER_ENABLED=0 +USER_EMAIL='$REQUEST_USER_EMAIL' +_EOF + fi + fi + sed -i "/ REQUEST_USER=$REQUEST_USER /d" $WEBBUILD_STATEDIR/requests + echo -n "" + exit +fi + +# send data for cookie +if [ "$REQUEST" = "password" ]; then + echo -n "$USER$USER_SECRET" +fi + +# kill processes or clean log +if [ "$REQUEST" = "killtree" ]; then + killline=`grep "^$KILLPID " $WEBBUILD_STATEDIR/processes` + if [ "$killline" ]; then + if [ $KILLPID -ge 1 ]; then + [ -e /proc/$KILLPID ] && $SUDO_WRAPPER killtree $KILLPID "$USER" + set -- $killline + rm -f $5 + sed -i "/^$KILLPID /d" $WEBBUILD_STATEDIR/processes + else + echo "ERROR: Invalid PID" + fi + fi + REQUEST=refresh +fi + +# refresh processes list +if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then + echo -n "Pending admin requests:" + while read line; do + eval $line + echo -n "
$REQUEST_USER: " + case $REQUEST_TYPE in + "enablerequest") echo -n "enable request" ;; + *) echo -n "unknown request" ;; + esac + echo -n " " + echo -n " " + done < $WEBBUILD_STATEDIR/requests + echo -n "" + fi + + numprocess=0 + while read line; do + set -- $line + RETCODE=$6 +# if [ -e /proc/$1 -o $5 -lt 256 ]; then + numprocess=$(($numprocess + 1)) + cmdline=`echo $line | sed "s|$1 $2 $3 $4 $5 $RETCODE ||"` + cmdline=`echo $cmdline | sed "s| --colors web||"` + PACKAGE_ENCODED=`cgi_encodevar $4` + [ $numprocess -eq 1 ] && { + echo -n "
" + echo -n "Webbuild jobs: " + if [ "$STATE_JOBSSHOWALL" != "1" ]; then + echo "[ Show all ]" + else + echo "[ Show mine only ]" + fi + #echo -n "(please click on [x] to clean your build logs when you are done)" + echo -n "
" + } + [ "$STATE_JOBSSHOWALL" = "1" -o "$USER" = "$2" ] || continue + if [ $RETCODE -eq 256 -a -e /proc/$1 ]; then + echo -n "\"running...\"" + else + if [ $RETCODE -eq 0 ]; then +# echo -n "OK" + echo -n "\"OK\"" + else +# echo -n "ERROR ($RETCODE)" + echo -n "\"ERROR\"" + fi + fi + echo -n "$2 on `print_environment_descr $3`: " + if [ $RETCODE -eq 256 -a -e /proc/$1 ]; then + echo -n "\"" + echo -n "$cmdline\" " + else + echo -n "\"" + echo -n "$cmdline\" " + if [ $RETCODE -eq 256 ]; then + $SUDO_WRAPPER finishprocess $1 "$USER" $5 + RETCODE=$? + fi + fi + if [ "$2" = "$USER" -o "$USER_ADMIN" ]; then + if [ $RETCODE -eq 256 -a -e /proc/$1 ]; then + echo -n " [" + echo -n "kill" + else + echo -n " [" + echo -n "x" + fi + echo -n "]" + fi + echo -n "
" + done < $WEBBUILD_STATEDIR/processes + [ $numprocess -gt 0 ] && echo -n "
" + echo -n "]]>
" + exit +fi + +# message send request (social_log) +if [ "$REQUEST" = "message" -a "$USER" -a "$USER_CANSENDMESSAGES" ]; then + # external (autodist) social messages + [ "$MESSAGETYPE" ] || MESSAGETYPE=broadcastmessage + social_log "SUSER=$USER STYPE=$MESSAGETYPE SEMAIL=$USER_EMAIL STEXT=\"$MESSAGE\" STIME=`date +%s`" + echo "" + exit +fi + +# repsearch request +if [ "$REQUEST" = "repsearch" ]; then + echo -n "Repository search results for \"$REPSEARCHTEXT\":
" + echo -n "
"
+   $SUDO_WRAPPER 0 local "$USER" "" "openmamba-repository search -i ${REPSEARCHTEXT/-/\-}" | \
+      parse_search_output ${AUTOPORT_ARCH[$ENVIRONMENT]}
+#      sed "s|\(.*(source).*\)|\1|;
+#           s|\(.*(${AUTOPORT_ARCH[$ENVIRONMENT]}).*\)|\1|"
+   echo -n "
" + echo "
]]>
" + exit +fi + +# environment search request +if [ "$REQUEST" = "environmentsearch" ]; then + echo -n "Environment search results for \"$ENVSEARCHTEXT\":
" + echo -n "
"
+   echo -n "Installed packages providing '$ENVSEARCHTEXT':
" + WHAT_PROVIDES=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q --what-provides \"$ENVSEARCHTEXT\"" | sort -u` + echo -n "$WHAT_PROVIDES
" + if [ "${WHAT_PROVIDES:0:10}" != "no package" ]; then + for f in $WHAT_PROVIDES; do + echo -n "
$f installed package info:
" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -qi $f" + if [ $? -eq 0 ]; then + echo -n "
$f provides:
" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q $f --provides" + echo -n "
$f requirements:
" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "rpm -q $f --requires" + fi + done + fi +# sed "s|\(.*(source).*\)|\1|; +# s|\(.*(${AUTOPORT_ARCH[$ENVIRONMENT]}).*\)|\1|" + echo -n "
" + echo "
]]>
" + exit +fi + +# rpm manager +if [ "$REQUEST" = "rpmmanager" ]; then + environment_descr=`print_environment_descr $i` + echo -n "
" + echo -n "
" + echo -n "RPM manager for $environment_descr environment
" + + # select rpm manager resource directory to display + echo "" + + # multiselect + echo -n "
" + echo -n "
" + echo -n "
" + + resolve_rpmmanagerdir "$RPMMANAGERDIR" "${AUTOPORT_ARCH[$ENVIRONMENT]}" "$REPOSITORY" + rpmmanagerfiles=$rpmmanagerdir/$rpmmanagermask + if [ "${rpmmanagermode}" = "environment" ]; then + # local files in environment + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls -t $rpmmanagerfiles 2>/dev/null" | \ + while read f; do + pkgname=`basename $f` + echo -n "" + done + else + # files in real local repositories + ls -t $rpmmanagerfiles 2>/dev/null | \ + while read f; do + pkgname=`basename $f` + echo -n "" + done + fi + echo -n "
" + echo -n "
" + + if [ "$USER_CANINSTALL" ]; then + # force rpm install/upgrade operation + echo -n "  " + # rpm manager install packages + echo -n ""`\"+p+" + echo -n "\"`cgi_encodevar " in $environment_descr environment?"`\"" + echo -n ");>  " + # rpm manager upgrade packages + echo -n ""`\"+p+" + echo -n "\"`cgi_encodevar " in $environment_descr environment?"`\"" + echo -n ");>  " + fi + + # rpm manager close link + echo -n "
CLOSE
" + echo "]]>
" + exit +fi + +# set current user environment if not passed +if [ ! "$ENVIRONMENT" ]; then + for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do + [ "${AUTOPORT_ARCH[$i]}" ] || continue + if [ "${AUTOPORT_CHROOT_USER[$i]}" = "$USER" ]; then + ENVIRONMENT=$i + break + fi + if [ "${AUTOPORT_CHROOT_USER[$i]}" = "contrib" ]; then + ENVIRONMENT=$i + fi + done + [ "$ENVIRONMENT" ] || ENVIRONMENT=$DEFAULT_ENVIRONMENT +fi + +if [ "${AUTOPORT_CHROOT[$ENVIRONMENT]}" ]; then + WORKINGROOT="/var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/" + WORKINGHOME="/var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/usr/src/" + BUILDLOGDIR="/var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/home/${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}/.autodist/log/" + AUTOPORTLOGDIR="/var/autoport/${AUTOPORT_CHROOT[$ENVIRONMENT]}/home/${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}/.autoport/${AUTOPORT_ARCH[$ENVIRONMENT]}/" +elif [ "${AUTOPORT_NATIVE[$ENVIRONMENT]}" ]; then + WORKINGROOT="/" + WORKINGHOME=`getent passwd ${AUTOPORT_CHROOT_USER[$ENVIRONMENT]} | cut -d: -f6` + [ -e "$WORKINGHOME/RPM" ] || WORKINGHOME="/usr/src/" + BUILDLOGDIR="/home/${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}/.autodist/log/" + AUTOPORTLOGDIR="/home/${AUTOPORT_CHROOT_USER[$ENVIRONMENT]}/.autoport/${AUTOPORT_ARCH[$ENVIRONMENT]}/" +else + WORKINGROOT="/" + WORKINGHOME="/var/autodist/" + BUILDLOGDIR="/var/autodist/log/" + AUTOPORTLOGDIR="/var/autodist/.autoport/${AUTOPORT_ARCH[$ENVIRONMENT]}/" +fi + +# show log +if [ "$REQUEST" = "showlog" -o "$REQUEST" = "autobuildedit" ]; then + showlog + if [ "$REQUEST" = "autobuildedit" ]; then + REQUEST=edit + else + echo -n "" + exit + fi +fi + +echo -n "" +# expert mode checkbox +[ "$STATE_ADVANCEDCONTROLS" ] && CHECKED="checked=checked" || CHECKED= +echo -n " Autodist:" +# privacy mode checkbox +[ "$STATE_PRIVACYMODE" ] && CHECKED="checked=checked" || CHECKED= +echo -n " Privacy:" +echo -n "" +# maintainer mode checkbox +if [ "$USER_CANMAINTAIN" ]; then + [ "$MAINTAINERMODE" = "true" ] && CHECKED="checked" + echo -n "Maintainer:" +fi +# switch user select +if [ "$USER_ADMIN" -o "$STATE_FAKEUSER" ]; then + echo -n " | " + echo -n " Test user: " +fi +echo -n "]]>" + +if [ "$HOST_IS_X86_64" -a "${AUTOPORT_ARCH[$ENVIRONMENT]}" != "x86_64" ]; then + SUDO_WRAPPER="linux32 $SUDO_WRAPPER" +fi + +echo -n "Build environment:" +echo -n "]]>" + +if [ "$MAINTAINERMODE" = "true" ]; then + echo -n " " +elif [ ! "$REQUEST" -o "$REQUEST" = "changeenvironment" -o "$REQUEST" = "switchmaintainermode" -o "$REQUEST" = "prepare" -o "$REQUEST" = "reloadspec" ]; then + # SPECFILES select + echo -n "" + echo -n "" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls *.spec 2>/dev/null| sed \"s|.spec$||\" | sort -f" | while read f; do + specname=${f/.spec} + [ "$PACKAGE" = "$specname" ] && SELECTED="selected=\"selected\"" || SELECTED= + echo -n "" + done + echo -n ".spec]]>" +fi + +[ "$PACKAGE" -a ! "$REQUEST" ] && REQUEST=edit + +# clean output when changing environment +if [ ! "$REPOSITORY" -a ! "$PACKAGE" -a ! "$REQUEST" = "repsearch" ]; then + echo -n " " + echo -n " " + echo -n " " +fi + +# REPOSITORIES search +if [ ! "$REPSEARCHTEXT" ]; then + echo -n "Search repositories:" +#" + if [ "$PACKAGE" ]; then + echo -n "" + echo -n "]]>" +fi + +if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$MAINTAINERMODE" = "true" ]; then + # REPOSITORIES select + if [ "$MAINTAINERMODE" = "true" -o ! "$REPOSITORY" -o "$REQUEST" = "changeenvironment" ]; then + echo -n "" + echo -n "" + for f in `repository_list`; do + repname=`basename $f` + [ "$repname" = "$REPOSITORY" ] && SELECTED="selected=selected" || SELECTED= + if [ "$MAINTAINERMODE" = "true" -a ! "$USER_ALLREPOSITORIES" ]; then + for u in $USER_CANMAINTAIN_REPOSITORIES devel-$USER; do + [ "$u" = "$repname" ] && echo -n "" + done + else + echo -n "" + fi + done + echo -n "" + echo -n "]]>" +# echo -n " " + echo -n " " + echo -n " " + fi +else + echo -n "autobuilds:" + + # autobuild edit previous + echo -n "" + # autobuild edit select + echo -n "" + # autobuild edit next + echo -n " \" onclick=" + echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&" + echo -n "PACKAGE=\"+encodeURIComponent(getSelectedValueById(\"autobuildedit\",1).substring(0,getSelectedValueById(\"autobuildedit\",1).indexOf(';')))+\"&" + echo -n "LOGTYPE=\"+getSelectedValueById(\"autobuildedit\",1).substring(getSelectedValueById(\"autobuildedit\",1).indexOf(';')+1)+\"&LOGSTATUSOK=&" + echo -n "REQUEST=autobuildedit\");>" + # autodist current checkbox (in progress) + [ "$STATE_AUTODISTCURRENT" = "1" ] && SELECTED="checked" || SELECTED= + echo -n "" + echo -n " ]]>" + echo -n " " + echo -n " " + echo -n " " + if [ "$REQUEST" = "skip" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool skip $AUTODISTJOB" + RET=$? + if [ $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"added autodist job $AUTODISTJOB to skipped list\" STIME=`date +%s`" + fi + if [ "$NEXTPACKAGE" ]; then + PACKAGE=$NEXTPACKAGE + PACKAGEENCODED=`cgi_encodevar $PACKAGE` + LOGTYPE=$NEXTLOGTYPE + AUTODISTJOB= + showlog + REQUEST="edit" + fi + fi +fi + +if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + # PACKAGES (SRPM) select + if [ "$REQUEST" = "changerepository" -o "$REQUEST" = "switchmaintainermode" -a "$MAINTAINERMODE" != "true" ]; then + echo -n "" + #(getElementById('package').selectedIndex);>" + echo "" + SRPMBUTTONDISABLED="disabled=disabled" + if [ -e $local_ftp/$REPOSITORY ]; then + if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then + ls $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY + fi + else + curl $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \ + sed "s|.*\.src\.rpm\">\(.*\).*|\1|" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY + fi + while read f; do +# [ -r $f ] || continue + pkgname=`basename $f` + pkgname=${pkgname%.src.rpm} + pkgrel=${pkgname/*-} + pkgname=${pkgname%-$pkgrel} + pkgver=${pkgname/*-} + pkgname=${pkgname%-$pkgver} + if [ "$PACKAGE" = "$pkgname" ]; then + SELECTED="selected=\"selected\"" + SRPMBUTTONDISABLED= + else + SELECTED= + fi + echo -n "" + done < $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY + echo -n "" + echo -n "]]>" + if [ "$MAINTAINERMODE" != "true" ]; then + echo -n "" + if [ "${AUTOPORT_CHROOT[$ENVIRONMENT]}" ]; then + echo -n "" + fi + echo -n "]]>" + fi + fi + + # SPECFILE creation + if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -a "$MAINTAINERMODE" != "true" ]; then + echo -n "" + echo -n " Start from URL:" + echo -n " name:" + echo -n " type:" + echo -n " version:" + echo -n " branch/tag:" + echo -n "" + echo "]]>" + elif [ "$MAINTAINERMODE" = "true" ]; then + echo -n " " + fi +#else +# echo -n " " +fi + +if [ "$REQUEST" = "changespec" ]; then + if [ "$PACKAGE" ]; then + REQUEST="edit"; + fi +elif [ "$REQUEST" = "broadcastmessage" ]; then + BROADCASTMESSAGE=`echo $BROADCASTMESSAGE | sed "s|<|\<|g"` + social_log "SUSER=$USER STYPE=broadcastmessage SEMAIL=$USER_EMAIL STEXT=\"said:"$BROADCASTMESSAGE"\" STIME=`date +%s`" + REQUEST= +fi + +if [ "$SPECTEXT" ]; then + # save specfile + tmpfile=`mktemp --suffix=.webbuildspectmp` + echo -n $SPECTEXT | perl -MURI::Escape -e 'print uri_unescape(<>)' > $tmpfile + chmod 644 $tmpfile + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" ${PACKAGE/*\/} "cat $tmpfile > ${PACKAGE/*\/}.spec" $tmpfile + RET=$? + [ $RET -eq 0 ] || { + echo -n "ERROR: could not save file ${PACKAGE/*\/}.spec! Please report the problem, thanks.]]>" + exit 1 + } + rm -f $tmpfile +fi + +if [ "$REQUEST" = "edit" -o "$REQUEST" = "prepare" ]; then + if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STARGET=developers STEXT=\"is working on $PACKAGE in `print_environment_descr $ENVIRONMENT` environment\" STIME=`date +%s`" + fi +fi + +# Here requests which update the specfile, so editor is refreshed after +if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccreate" -o \ + "$REQUEST" = "rebuildspec" -o "$REQUEST" = "renamespec" -o "$REQUEST" = "deletespec" -o \ + "$REQUEST" = "autodistprepare" -o "$REQUEST" = "autodistupdate" -o "$REQUEST" = "addpkgnote" ]; then + echo -n "Console output:
" + echo -n "
"
+   RET=255
+   case $REQUEST in
+      "prepare") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a1 --server $REPOSITORY"; RET=$? ;;
+      "updatespec") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-update"
+                    [ "$DEBUG" = "true" ] && RPMFORCEADD="$RPMFORCEADD --debug"
+                    if [ "$UPDATESPECVERSION" -a "$REBUILDSPECCHANGELOG" ]; then
+                       echo "ERROR: new version and changelog can't be specified together"
+                    elif [ "$REBUILDSPECCHANGELOG" ]; then
+                       $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a4 $RPMFORCEADD --rebuild --changelog \"$REBUILDSPECCHANGELOG\""
+                    elif [ "$UPDATESPECVERSION" ]; then
+                       $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a3,4 $RPMFORCEADD $UPDATESPECVERSION"
+                    else
+                       $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a2:4 $RPMFORCEADD $UPDATESPECVERSION"
+                    fi
+                    RET=$?
+                    ;;
+      "speccreate") if [ "$SPECCREATEURL" -a "$PACKAGE" ]; then
+                       AUTOSPEC_CMDLINE="-n $PACKAGE -o $PACKAGE.spec"
+                       #DECODEDURL=`cgi_decodevar $SPECCREATEURL`
+                       [ "$SPECCREATETYPE" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -t $SPECCREATETYPE"
+                       [ "$SPECCREATEVERSION" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE -v $SPECCREATEVERSION"
+                       [ "$SPECCREATEGITBRANCH" ] && AUTOSPEC_CMDLINE="$AUTOSPEC_CMDLINE --git-branch $SPECCREATEGITBRANCH"
+                       $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "$AUTOSPEC_CMD -s \"$SPECCREATEURL\" $AUTOSPEC_CMDLINE --changelog \"package created by $USER using the webbuild interface\""
+                       RET=$?
+                       [ $RET -eq 0 ] && {
+                          social_log "SUSER=$USER SEMAIL=$USER_EMAIL STARGET=developers STEXT=\"is working on $PACKAGE new package in `print_environment_descr $ENVIRONMENT` environment\" STIME=`date +%s`"
+                          # prepare
+                          $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bp $PACKAGE.spec --nodeps"
+                          RET=$?
+                          if [ $RET -eq 0 ]; then
+                             REQUEST_NEXT="showbuilddocs"
+                          fi
+                          #echo "
HINT: don't forget to add build requirements after successful build! Edit specfile and check recreate SRPM before sending the package." + } + else + echo "ERROR: both source archive URL and name are needed." + RET=1 + fi + ;; + "renamespec") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "mv $RENAMESPECFROM.spec $PACKAGE.spec && sed -i \"s|\(Name:[[:space:]]*\).*|\1$PACKAGE|\" $PACKAGE.spec" + RET=$? + [ $RET -eq 0 ] && { + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"renamed $RENAMESPECFROM to $PACKAGE in `print_environment_descr $ENVIRONMENT` environment\" STIME=`date +%s`" + echo "Specfile $RENAMESPECFROM successfully renamed to $PACKAGE." + } + ;; + "deletespec") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rm -f $PACKAGE.spec" + RET=$? + [ $RET -eq 0 ] && REQUEST="exit" + ;; + "autodistprepare") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD= + autodistjobs= + if [ "$AUTODISTPKGS" ]; then + for p in $AUTODISTPKGS; do + autodistjobs="$autodistjobs $AUTODISTJOB/$p" + done + else + autodistjobs="$AUTODISTJOB" + fi + [ "$REPOSITORY" ] && REPOSITORYADD="--repository $REPOSITORY" || REPOSITORYADD="--repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -p $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH --user $USER $AUTODISTADD" + RET=$? + ;; + "autodistupdate") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD= + [ "$DEBUG" = "true" ] && AUTODISTADD="$AUTODISTADD --debug" || AUTODISTADD= + if [ "$AUTODISTUPDATECHANGELOG" ]; then + AUTODISTADD="$AUTODISTADD --rebuild -- --changelog \"${AUTODISTUPDATECHANGELOG}\"" + fi + autodistjobs= + if [ "$AUTODISTPKGS" ]; then + for p in $AUTODISTPKGS; do + autodistjobs="$autodistjobs $AUTODISTJOB/$p" + done + else + autodistjobs="$AUTODISTJOB" + fi + [ "$REPOSITORY" ] && REPOSITORYADD="--repository $REPOSITORY" || REPOSITORYADD="--repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]}" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -u $autodistjobs $REPOSITORYADD --arch $AUTODISTARCH --user $USER $AUTODISTADD" + RET=$? + ;; + "addpkgnote") echo "`date +%s` $USER $ENVIRONMENT $PKGNOTE" >> $WEBBUILD_STATEDIR/notes/$PACKAGE.notes; RET=$? ;; + esac + echo -n "
" + if [ $RET -eq 0 ]; then + echo "Result: OK" + else + echo "Result: ERROR ($RET)" + fi + echo -n "
" + echo -n "]]>
" + if [ "$REQUEST" = "exit" ]; then + echo -n " " + echo -n " " + echo -n " " + echo -n " " + echo -n "" + exit + fi + if [ $RET -eq 0 ]; then + REQUEST="edit" + print_editorcontrols + if [ "$PACKAGE" ]; then + if [ "$STATE_ADVANCEDCONTROLS" -o "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + print_showlogcontrols + fi + fi + else + REQUEST= + fi +fi + +# maintainer mode editor +if [ "$MAINTAINERMODE" = "true" ]; then + if [ ! "$REQUEST" -o "$REQUEST" = "changerepository" -o \ + "$REQUEST" = "switchmaintainermode" -o "$REQUEST" = "reloadmaintainer" ]; then + echo -n " " + echo -n " " + echo -n " " + if [ "$REPOSITORY" ]; then + echo -n "" + echo -n "Recent packages in $REPOSITORY:
" + cat $local_ftp/distromatic/$REPOSITORY/_recent.inc | sed "s|a href=|a target=new href=|g" + echo -n "
Log:
"
+         cat $local_ftp/$REPOSITORY/distromatic.log
+         echo -n "
" + echo -n "" + echo -n "]]>
" + else + echo -n " " + fi + REQUEST= + fi +fi + +if [ "$REQUEST" = "changerepository" -o "$REQUEST" = "switchmaintainermode" -o "$REQUEST" = "changeenvironment" ]; then + REQUEST= +fi + +if [ "$PACKAGE" ]; then + [ "$AUTODISTJOB" ] || AUTODISTJOB=${PACKAGE/\/*} + AUTODISTJOB="${AUTODISTJOB/-/_}" + PACKAGE=${PACKAGE/*\/} + eval `$SUDO_WRAPPER specinfo $ENVIRONMENT "$USER" $PACKAGE ""` + [ $? -eq 0 ] && SPECAVAILABLE=1 +fi + +# specfile editor +if [ "$REQUEST" = "edit" -o "$REQUEST" = "reloadspec" -o "$REQUEST" = "switchmaintainermode" -o \ + "$REQUEST" = "renamespec" -o "$REQUEST" = "addpkgnote" -a "$MAINTAINERMODE" != "true" ]; then + if [ "$SPECAVAILABLE" ]; then + # editor textarea + echo -n "" + echo -n "Packaging notes for $PACKAGE:" + while read ndate nuser nenv line; do + echo "
$nuser: \"$line\"" + if [ "$USER" = "$nuser" -o "$USER_ADMIN" ]; then + echo -n " [" + echo -n "x]" + fi + done < $WEBBUILD_STATEDIR/notes/$PACKAGE.notes + echo -n "" + fi + echo -n "Current $PACKAGE.spec in build environment:]]>
" +# else +# echo "" +# echo "No pre-existing .spec file $PACKAGE.spec in current working environment. Choose package from a repository and press 'Unpack and edit' to edit." +# echo -n "" +# echo -n "]]>" + print_editorcontrols + if [ "$PACKAGE" ]; then + if [ "$STATE_ADVANCEDCONTROLS" -o "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + print_showlogcontrols + fi + fi + fi + REQUEST=$REQUEST_NEXT +fi + +# operation panel +if [ "$MAINTAINERMODE" != "true" ]; then + echo -n "" + [ "$PACKAGE" ] && { + echo -n "Package: $PACKAGE
Version: " + [ "${SPECVAR_Epoch[0]}" ] && echo -n "${SPECVAR_Epoch[0]}:" || echo -n "0:" + echo -n "${SPECVAR_Version[0]}-${SPECVAR_Release[0]}
" + } + echo -n "Target arch:" + echo -n "" + echo -n "" + # destination repository select + echo -n "
Send to:" + echo -n "
" + [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -o "$STATE_ADVANCEDCONTROLS" ] && echo -n "
Autodist batch builds:
" + if [ "$PACKAGE" ]; then + if [ "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + echo -n "Patch for $PACKAGE:
" + # autodist show patch + echo -n "" + # autodist remove patch + echo -n "$PACKAGE?"`\"); class=redbutton>" + # autodist auto patch + echo -n "$PACKAGE?"`\"); class=redboldbutton>" + ## autodist update patch + #echo -n "update patch for package $PACKAGE?"`\"); class=redbutton>" + ## autodist build patch + #echo -n "build patch for package $PACKAGE?"`\"); class=redbutton>" + fi + fi + if [ "$STATE_ADVANCEDCONTROLS" -o "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + # autodist list-jobs + [ "$PACKAGE" -a "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ] && echo -n "
" + echo -n "Job:" + if [ "$AUTODISTJOB" ]; then + echo -n "
Job packages:" + echo -n "" + echo -n "
" + for p in `$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist --list-pkgs $AUTODISTJOB"`; do + if [ "$AUTODISTPKGS" ]; then + for i in $AUTODISTPKGS; do + [ "$i" = "$p" ] && { SELECTED=checked; break; } || SELECTED= + done + else + [ "$p" = "$PACKAGE" ] && SELECTED=checked || SELECTED= + fi + echo -n "" + done + echo -n "
" + # autodist prepare + echo -n "" + # autodist update + echo -n "" + # autodist build + echo -n "" + # autodist install + [ ! "$USER_CANINSTALL" ] && DISABLED="disabled=disabled" || DISABLED= + echo -n ""`\"+getSelectedValueById('autodistjobs')+\"" + echo -n "`cgi_encodevar " job in current environment?"`\"" + echo -n "); class=redbutton $DISABLED>" + # autodist send + [ ! "$USER_ALLREPOSITORIES" ] && DISABLED="disabled=disabled" || DISABLED= + echo -n ""`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar " job to "`\"+" + echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "?"`\"); class=redbutton $DISABLED>" + # autodist update changelog + echo -n "Rebuild changelog:" + echo -n "" + # autodist schedule + echo -n "
"`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar " autodist job for automatic update?"`\"); class=boldbutton>" + echo -n "(version:)" + # autodist show schedule + echo -n "" + # autodist unschedule + echo -n "" + # autodist skip + echo -n ""`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar " from being checked for automatic updates for a period?"`\"" + echo -n "); class=redbutton>
" + else + echo -n "
" + fi + # automatic port + if [ ! "${AUTOPORT_DISABLE[$ENVIRONMENT]}" -a ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + echo -n "Automatic port:" + echo -n "$PACKAGE package in "`\"+p+\"`cgi_encodevar " with current specfile changes?"`\"); class=redbutton>" + echo -n "" + fi + fi + if [ "$PACKAGE" ]; then + echo -n "
RPM packaging commands:
" + # check for updates + echo -n "" + # unpack + echo -n "" + # build + echo -n "" + # unpackaged files + echo -n "" + # build requirements + echo -n "" + ## recreate SRPM + #echo -n "" + # rpm checks + echo -n "" + echo -n "" + # rpm install + [ ! "$USER_CANINSTALL" ] && DISABLED="disabled=disabled" + echo -n "$PACKAGE in current environment?"`\"" + echo -n "); class=redbutton $DISABLED>" + # rpm send + if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then + HREFADD="disabled=disabled title=\"WARNING: fix specfile build requirements before you can send the package\"" + else + HREFADD= + fi + echo -n "$PACKAGE built packages to "`\"+getSelectedValueById('sendrepository')+" + echo -n "\"`cgi_encodevar "?

HINT: does summary look short and good?
${SPECVAR_Name[0]} - ${SPECVAR_Summary[0]}."`\"" + echo -n "); class=redbutton $HREFADD>" + # recreate and send SRPM + if [ "$SPECVAR_CHECK_NOAUTOBUILDREQ" ]; then + HREFADD="disabled=disabled title=\"WARNING: fix specfile build requirements before you can send the package\"" + else + HREFADD= + fi + echo -n "$PACKAGE source package only to "`\"+getSelectedValueById('sendrepository')+" + echo -n "\"`cgi_encodevar "?

WARNING: use this to refresh the SRPM of a package which already exists with same release in repository"`\"" + echo -n "); class=redbutton $HREFADD>" + # recreate SRPM before sending checkbox + echo -n "" + # add patches + echo -n "
Add patches:" + echo -n "" + echo -n " pastebin
" + echo -n "URL:" + echo -n "
$PACKAGE-${SPECVAR_Version}-" + echo -n ".patch" + echo -n "
" + # upload sources + echo -n "
Upload source:" + echo -n "
" + echo -n "" + echo -n "" + echo -n "
" + echo -n "

" + # info from package sources + echo -n "Info from package in the works:
" + # show sources + echo -n "" + # show patches + echo -n "" + # list build dir files + echo -n "" + # show package licenses + echo -n "" + # show package build docs + echo -n "" + # show package configure help + echo -n "" + # show package configure log + echo -n "" + # buildroot files + echo -n "" + # show package changelog + echo -n "" + + # generic info + echo -n "
Generic info:
" + # allowed groups + echo -n "" + # approved licenses + echo -n "" + # templates + echo -n "" + # macros + echo -n "
" + fi + echo -n "]]>
" +fi + +echo -n "Write a message to all developers:
" +echo -n "" +#echo -n "
" + +if [ "$REQUEST" != "" ]; then + echo -n "" + echo -n "Console output ($REQUEST" + [ "$PACKAGE" ] && echo -n " for $PACKAGE" + echo -n "):" + echo -n "
" + else + echo -n "id=outputtop>" + fi + if [ "$REQUEST" != "showchangelogs" -a "$REQUEST" != "showbuilddocs" -a "$REQUEST" != "showlicenses" ]; then + echo -n "
"
+   fi
+   RET=255
+fi
+
+case $REQUEST in
+   "savespec") echo "File $PACKAGE.spec saved."
+               RET=-1
+               ;;
+   "smartupgrade") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "export LANG=C;sudo smart update && sudo smart upgrade"
+                     RET=$?
+                     ;;
+   "runldconfig") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "/sbin/ldconfig"
+                     RET=$?
+                     ;;
+   "showpatch") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "autodist-tool makepatch $PACKAGE"; RET=$? ;;
+   "removepatch") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "autodist-tool makepatch $PACKAGE remove"
+                     RET=$?
+                     if [ $RET -eq 0 ]; then
+                        social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"removed the autodist patch for $PACKAGE\" STIME=`date +%s`"
+                     fi ;;
+   "autopatch") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "autodist-tool makepatch $PACKAGE auto"
+                     RET=$?
+                     if [ $RET -eq 0 ]; then
+                        social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"made an autodist patch for $PACKAGE\" STIME=`date +%s`"
+                     fi ;;
+   "updatepatch") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "autodist-tool makepatch $PACKAGE update"
+                     RET=$?
+                     if [ $RET -eq 0 ]; then
+                        social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"made an autodist update patch for $PACKAGE\" STIME=`date +%s`"
+                     fi ;;
+   "buildpatch") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "autodist-tool makepatch $PACKAGE build"
+                    RET=$?
+                    if [ $RET -eq 0 ]; then
+                       social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"made an autodist build patch for $PACKAGE\" STIME=`date +%s`"
+                    fi ;;
+   "showscheduled") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule"; RET=$? ;;
+   "schedule") if [ "$SCHEDULEVERSION" ]; then
+                  $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule $AUTODISTJOB#$SCHEDULEVERSION"
+                  RET=$?
+                  if [ $RET -eq 0 ]; then
+                     social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"scheduled autodist job $AUTODISTJOB for update to version $SCHEDULEVERSION\" STIME=`date +%s`"
+                  fi
+               else
+                  $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool schedule $AUTODISTJOB"
+                  RET=$?
+                  if [ $RET -eq 0 ]; then
+                     social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"scheduled autodist job $AUTODISTJOB for automatic update\" STIME=`date +%s`"
+                  fi
+               fi
+               ;;
+   "unschedule") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist-tool unschedule $AUTODISTJOB"
+                    RET=$?
+                    if [ $RET -eq 0 ]; then
+                       social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"unscheduled autodist job $AUTODISTJOB\" STIME=`date +%s`"
+                    fi ;;
+   "autodistbuild") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
+                       autodistjobs=
+                       if [ "$AUTODISTPKGS" ]; then
+                          for p in $AUTODISTPKGS; do
+                             autodistjobs="$autodistjobs $AUTODISTJOB/$p"
+                          done
+                       else
+                          autodistjobs="$AUTODISTJOB"
+                       fi
+                       $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autodist -v -b $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --arch $AUTODISTARCH --user $USER $AUTODISTADD" &>/dev/null
+                       [ $? -ne 0 ] && RET=$? || {
+                          RET=-1
+                          echo "Autodist build start. You may see the output in the Webbuild jobs box above."
+                       }
+                       #[ $RET -eq 0 ] && social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"successfully built $PACKAGE\" STIME=`date +%s`"
+                       ;;
+   "autodistinstall") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
+                      autodistjobs=
+                      if [ "$AUTODISTPKGS" ]; then
+                         for p in $AUTODISTPKGS; do
+                            autodistjobs="$autodistjobs $AUTODISTJOB/$p"
+                         done
+                      else
+                         autodistjobs="$AUTODISTJOB"
+                      fi
+                      $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autodist -v -i $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --arch $AUTODISTARCH --user $USER $AUTODISTADD" &>/dev/null
+                      [ $? -ne 0 ] && RET=$? || {
+                         RET=-1
+                         echo "Autodist install start. You may see the output in the Webbuild jobs box above."
+                      }
+                      ;;
+   "autodistsend") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="--force" || AUTODISTADD=
+                      autodistjobs=
+                      if [ "$AUTODISTPKGS" ]; then
+                         for p in $AUTODISTPKGS; do
+                            autodistjobs="$autodistjobs $AUTODISTJOB/$p"
+                         done
+                      else
+                         autodistjobs="$AUTODISTJOB"
+                      fi
+                      $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "autodist -v -s $autodistjobs --repository ${AUTOPORT_BASE_REPOSITORY[$ENVIRONMENT]} --server $SENDREPOSITORY --arch $AUTODISTARCH --user $USER $AUTODISTADD"
+                      RET=$?
+                      [ $RET -eq 0 ] && social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent $AUTODISTPKGS $SPECVAR_Version-$SPECVAR_Release from `print_environment_descr $ENVIRONMENT` to $SENDREPOSITORY\" STIME=`date +%s`"
+                      ;;
+   "autoport") if [ "$AUTOPORTPACKAGE" ]; then
+                  $SUDO_WRAPPER background $ENVIRONMENT "$USER" $AUTOPORTPACKAGE "autoport $AUTOPORTPACKAGE -r $REPOSITORY" &>/dev/null
+                  RET=$?
+                  [ $REQ -eq 0 ] && {
+                     RET=-1
+                     echo "Autoport started. You may see the output in the Webbuild jobs box above."
+                  }
+               else
+                  echo "ERROR: no port package specified!"
+                  RET=1
+               fi
+               ;;
+   "autospecupdatescheck") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a2"; RET=$? ;;
+   "rpmprepare") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bp $PACKAGE.spec --nodeps"; RET=$? ;;
+   "rpmbuild") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-build"
+               [ "$RPMBUILDARCH" -a "$RPMBUILDARCH" != "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] && \
+                  RPMARCHADD="-A $RPMBUILDARCH --define \"cross_target_cpu=$RPMBUILDARCH\""
+               $SUDO_WRAPPER background $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a5,6 $RPMFORCEADD $RPMARCHADD" &>/dev/null
+#                 && echo \"Webbuild HINT: now you may want to click on 'build requirements', add build requirements in .spec file and then 'recreate SRPMS'\""
+               [ $? -ne 0 ] && RET=$? || {
+                  RET=-1
+                  echo -n "Build started. You may see the output in the Webbuild jobs box above."
+                  echo -n "

HINT: when build is done add or update build requirements to specfile and recreate SRPM." + } + ;; + "srpmbuild") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--nodeps" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bs --define=\"_sourcedir $SPECVAR_WORKINGHOME/RPM/SOURCES\" $RPMFORCEADD $PACKAGE.spec" + RET=$? ;; + "autospeclistcheck") + [ "$RPMBUILDARCH" -a "$RPMBUILDARCH" != "${AUTOPORT_ARCH[$ENVIRONMENT]}" ] && \ + RPMARCHADD="-A $RPMBUILDARCH --define \"cross_target_cpu=$RPMBUILDARCH\"" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a5 --list-check --force $RPMARCHADD" + RET=$? ;; + "autospecbuildreq") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a6" + RET=$? ;; + "rpmchecks") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a8"; RET=$? ;; + "rpmsimulateinstall") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a7"; RET=$? ;; + "rpminstall") if [ "$USER_CANINSTALL" ]; then + [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--force-install" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a11 $RPMFORCEADD"; RET=$? + else + echo "Install function disabled." + RET=1 + fi ;; + "sendpackage") if [ "$SENDREPOSITORY" ]; then + if [ "$SENDRECREATESRPM" = "true" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bs --define=\"_sourcedir $SPECVAR_WORKINGHOME/RPM/SOURCES\" $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOSITORY" + RET=$? + else + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOSITORY" + RET=$? + fi + if [ $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent $PACKAGE $SPECVAR_Version-$SPECVAR_Release from `print_environment_descr $ENVIRONMENT` to $SENDREPOSITORY\" STIME=`date +%s`" + fi + else + echo "ERROR: send repository is not defined." + RET=255 + fi + ;; + "sendsource") [ "$RPMFORCE" = "true" ] && RPMFORCEADD="--nodeps" + if [ "$SENDREPOSITORY" ]; then + if [ "$SENDRECREATESRPM" = "true" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "rpmbuild -bs --define=\"_sourcedir $SPECVAR_WORKINGHOME/RPM/SOURCES\" $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOSITORY --norpm" + RET=$? + if [ $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent edited $PACKAGE source to $SENDREPOSITORY\" STIME=`date +%s`" + fi + else + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "$AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOSITORY --norpm" + RET=$? + if [ $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"sent $PACKAGE source to $SENDREPOSITORY\" STIME=`date +%s`" + fi + fi + else + echo "ERROR: send repository is not defined." + RET=255 + fi + ;; + "addpatch") if [ "$ADDPATCHURL" -a "$ADDPATCHNAME" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "curl -sSkL '$ADDPATCHURL' -o ../SOURCES/$PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch" + RET=$? + [ $RET -eq 0 ] && { + echo -n "Patch added to sources with name '$PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch'." + for l in 1 0 2 3; do + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && patch --dry-run -s -p1 < $SPECVAR_RPMSOURCESDIR/$PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch >/dev/null" + RET=$? + [ $RET -eq 0 ] && break + done + if [ $RET -eq 0 ]; then + echo -n "
Info: good, patch applies successfully with -p$l option!" + echo -n "

HINT: add the following lines in the appropriate sections:
" + else + echo -n "
Warning: patch does not apply with '-p0' to '-p3' options!" + echo "

HINT: you might want to retry from a clean build dir after pressing the 'unpack' button or check if it applies after changing working subdirectory in build tree." + echo -n "
HINT: add anyway the following lines in the appropriate sections and press 'prepare' to see patch command output:
" + fi + echo -n "
1) in the header after last 'Patch:' entry (or after 'Source:' if this is the first patch) :
" + if [ "${SPECVAR_Patch[*]}" ]; then + NEWPATCHNUM=$((${SPECVAR_Patch_idx[${#SPECVAR_Patch[@]}-1]}+1)) + else + NEWPATCHNUM=0 + fi + echo -ne "
Patch$NEWPATCHNUM:        $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch
" + echo -n "2) in %prep section after %setup:
" + echo -ne "
%patch$NEWPATCHNUM -p$l
" + RET=-1 + } + else + echo "ERROR: Patch URL or destination name not provided." + RET=1 + fi ;; + "uploadsource") if [ "$UPLOADFILENAME" ]; then + UPLOADFILENAME="${UPLOADFILENAME/*\\}" + if [ -e $WEBBUILD_STATEDIR/uploads/$UPLOADFILENAME ]; then + tmpfile=`mktemp --suffix=webbuildtmp` + mv $WEBBUILD_STATEDIR/uploads/$UPLOADFILENAME $tmpfile +# $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "if [ -e $SPECVAR_RPMSOURCESDIR/${UPLOADFILENAME} ]; then echo \"Warning: file already exists in SOURCE directory\"; fi" + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cp $tmpfile $SPECVAR_RPMSOURCESDIR/${UPLOADFILENAME}" $tmpfile + RET=$? + rm -f $tmpfile + if [ $RET -eq 0 ]; then + echo "Info: file ${UPLOADFILENAME} successfully added to SOURCES directory." + echo -n "
HINT: add the following line in the header after last 'Source:' entry:" + if [ "${SPECVAR_Source[*]}" ]; then + NEWSOURCENUM=$((${SPECVAR_Source_idx[${#SPECVAR_Source[*]}-1]}+1)) + else + NEWSOURCENUM=0 + fi + echo -ne "
Source$NEWSOURCENUM:       ${UPLOADFILENAME}
" + RET=-1 + else + echo "ERROR: could not copy file to SOURCES directory." + fi + else + echo "ERROR: Upload of source file ${UPLOADFILENAME} FAILED." + RET=-1 + fi + else + echo "ERROR: upload filename is empty." + RET=1 + fi ;; + "repositoryimport") + [ "$PACKAGES" ] || { + echo "ERROR: no packages(s) selected." + RET=1 + break + } + for p in $PACKAGES; do + [ "$REPOSITORYSIMULATE" = "true" -o ! "$USER_CANMAINTAIN" ] && SIMULATEADD="-s" || SIMULATEADD= + [ "$REPOSITORYFORCE" = "true" ] && FORCEADD="-f" + $SUDO_WRAPPER 0 local "$USER" "$PACKAGE" "openmamba-repository import $SENDREPOSITORY $p -d $REPOSITORYIMPORTTO $SIMULATEADD $FORCEADD -y" + RET=$? + if [ ! "$SIMULATEADD" -a $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"imported $p from $SENDREPOSITORY to $REPOSITORYIMPORTTO\" STIME=`date +%s`" + fi + [ $RET -eq 0 ] || break + done + ;; + "repositoryrelease") + [ "$PACKAGES" ] || { + echo "ERROR: no package(s) selected." + RET=1 + break + } + for p in $PACKAGES; do + [ "$REPOSITORYSIMULATE" = "true" -o ! "$USER_CANMAINTAIN" ] && SIMULATEADD="-s" || SIMULATEADD= + [ "$REPOSITORYFORCE" = "true" ] && SIMULATEADD="$SIMULATEADD -f" + $SUDO_WRAPPER 0 local "$USER" "$PACKAGE" "openmamba-repository release $SENDREPOSITORY $p -d $REPOSITORYIMPORTTO $SIMULATEADD -y" + RET=$? + if [ ! "$SIMULATEADD" -a $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"released $p from $SENDREPOSITORY to $REPOSITORYIMPORTTO\" STIME=`date +%s`" + fi + [ $RET -eq 0 ] || break + done + ;; + "repositorydiff") + [ "$PACKAGES" ] || { + echo "ERROR: no package(s) selected." + RET=1 + break + } + for p in $PACKAGES; do + $SUDO_WRAPPER 0 local "$USER" "" "openmamba-repository diff $SENDREPOSITORY $p -d $REPOSITORYIMPORTTO" + RET=$? + [ $RET -eq 0 ] || break + done + ;; + "repositoryarchive") + [ "$PACKAGES" ] || { + echo "ERROR: no package(s) selected." + RET=1 + break + } + for p in $PACKAGES; do + [ "$REPOSITORYSIMULATE" = "true" -o ! "$USER_CANMAINTAIN" ] && SIMULATEADD="-s" || SIMULATEADD= + $SUDO_WRAPPER 0 local "$USER" "$PACKAGE" "openmamba-repository archive $SENDREPOSITORY $p -y" + RET=$? + if [ ! "$SIMULATEADD" -a $RET -eq 0 ]; then + social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"archived $p from $SENDREPOSITORY\" STIME=`date +%s`" + fi + [ $RET -eq 0 ] || break + done + ;; + "repositorymassrebuild") + if [ ! "$PACKAGES" ]; then + echo "ERROR: no package(s) selected." + RET=1 + elif [ ! "$MASSREBUILDCHANGELOG" ]; then + echo "ERROR: changelog was not specified." + RET=1 + else + $SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autoport -r $SENDREPOSITORY -d $REPOSITORYIMPORTTO $PACKAGES -u \"$MASSREBUILDCHANGELOG\"" &>/dev/null + [ $? -ne 0 ] && RET=$? || { + RET=-1 + echo -n "Mass rebuild started. You may see the output in the Webbuild jobs box above." + } +# if [ $RET -eq 0 ]; then +# social_log "SUSER=$USER SEMAIL=$USER_EMAIL STEXT=\"mass rebuilt $PACKAGES from $SENDREPOSITORY and sent them to $REPOSITORYIMPORTTO\" STIME=`date +%s`" +# fi + fi + ;; + "repositorysync") + if [ "$REPOSITORY" ]; then + $SUDO_WRAPPER background local "$USER" "" "/etc/cron.hourly/10-openmamba-sync-back $REPOSITORY" + LOCALRET=$? + [ $LOCALRET -eq 0 ] && $SUDO_WRAPPER background local "$USER" "" "/etc/cron.hourly/20-openmamba-apt $REPOSITORY" + LOCALRET=$? + [ $LOCALRET -eq 0 ] && $SUDO_WRAPPER background local "$USER" "" "/etc/cron.hourly/40-openmamba-rsync $REPOSITORY" + LOCALRET=$? + [ $LOCALRET -ne 0 ] && RET=$LOCALRET || RET=-1 + fi + ;; + "autoportnp") [ "$AUTODISTFORCE" = "true" ] && AUTODISTADD="-f" || AUTODISTADD= + $SUDO_WRAPPER background $ENVIRONMENT "$USER" $PACKAGE "autoport -np $PACKAGE -r $SENDREPOSITORY $AUTODISTADD" &>/dev/null + [ $? -ne 0 ] && RET=$? || { + RET=-1 + echo -n "Autoport started. You may see the output in the Webbuild jobs box above." + } + ;; + "autoportlog") cat "$AUTOPORTLOGDIR/current.log"; RET=$? ;; + "allowedgroups") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "$AUTOSPEC_CMD --eval rpm_allowed_groups" + RET=$? + [ $RET -eq 0 ] && RET=-1 + ;; + "approvedlicenses") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "$AUTOSPEC_CMD --eval rpm_approved_licenses | grep -v \"^#\"" | \ + while read line; do + echo $line + done + RET=-1 + ;; + "builddirfiles") if [ ! "$SPECVAR_BUILDDIR" ]; then + echo "ERROR: BUILDDIR is undefined" + RET=1 + else + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR && find $SPECVAR_BUILDDIR" + RET=$? + [ $RET -eq 0 ] && RET=-1 + fi + ;; + "buildrootfiles") if [ ! "$SPECVAR_BUILDROOT" ]; then + echo "ERROR: BUILDROOT is undefined" + RET=1 + else + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDROOT/$SPECVAR_BUILDROOT && find" + RET=$? + fi + ;; + "showchangelogs"|"showbuilddocs"|"showlicenses") + if [ "$REQUEST" = "showchangelogs" ]; then + PATTERN="-iname changelog -or -iname news -and -type f" + elif [ "$REQUEST" = "showlicenses" ]; then + PATTERN="-iname license\* -or -iname copying\* -or -iname authors\* -or -iname credits\* -and -type f" + elif [ "$REQUEST" = "showbuilddocs" ]; then + PATTERN="-iname readme\* -or -iname install\* -or -iname todo\* -or -iname pkgbuild\* -or -iname \*.desktop -and -type f" + fi + show_docs `$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && find . $PATTERN -maxdepth 2"` + RET=-1 + ;; + "configurehelp") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && ./configure --help || ./waf configure --help" + RET=$? + [ $RET -eq 0 ] && RET=-1 ;; + "configurelog") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cd $SPECVAR_RPMBUILDDIR/$SPECVAR_BUILDDIR && cat config.log" + RET=$? + [ $RET -eq 0 ] && RET=-1 ;; + "showautospectemplate") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat /usr/share/autospec/templates/$AUTOSPECTEMPLATE" + RET=$? + [ $RET -eq 0 ] && RET=-1 ;; + "showmacrosfile") $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat /etc/rpm/macros.$MACROSFILE" + RET=$? + [ $RET -eq 0 ] && RET=-1 ;; + "showpatchfile") OUTPATCHFILE=${PATCHFILE/*\/} + case ${OUTPATCHFILE/*.} in + gz|gzip) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "gunzip -c $SPECVAR_RPMSOURCESDIR/$OUTPATCHFILE" | parse_patch_output ;; + bz2) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "bzcat $SPECVAR_RPMSOURCESDIR/$OUTPATCHFILE" | parse_patch_output ;; + *) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat $SPECVAR_RPMSOURCESDIR/$OUTPATCHFILE" | parse_patch_output ;; + esac + RET=$? + [ $RET -eq 0 ] && RET=-1 + ;; + "showsourcefile") OUTSOURCEFILE=${SOURCEFILE/*\/} + case ${OUTSOURCEFILE} in + *.tar.*) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "tar tvf $SPECVAR_RPMSOURCESDIR/$OUTSOURCEFILE" ;; + *.gz|*.gzip) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "gunzip -c $SPECVAR_RPMSOURCESDIR/$OUTSOURCEFILE" ;; + *.bz2) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "bzcat $SPECVAR_RPMSOURCESDIR/$OUTSOURCEFILE" ;; + *) $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" $PACKAGE "cat $SPECVAR_RPMSOURCESDIR/$OUTSOURCEFILE" | parse_patch_output ;; + esac + RET=$? + [ $RET -eq 0 ] && RET=-1 + ;; + "rpmmanagerinstall"|"rpmmanagerupgrade") if [ "$USER_CANINSTALL" ]; then + [ "$RPMMANAGERFORCE" = "true" ] && rpmforceadd="--force" + echo -n "" + resolve_rpmmanagerdir "$RPMMANAGERDIR" "${AUTOPORT_ARCH[$ENVIRONMENT]}" "$REPOSITORY" + for f in $RPMMANAGERPACKAGES; do + installpackages="$installpackages $rpmmanagerdir/$f" + done + if [ "$installpackages" ]; then + if [ "$REQUEST" = "rpmmanagerinstall" ]; then + echo "Installing packages: $RPMMANAGERPACKAGES
" + if [ "$rpmmanagermode" = "environment" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "sudo rpm -i $installpackages $rpmforceadd" + else + sudo rpm -i $installpackages $rpmforceadd + fi + elif [ "$REQUEST" = "rpmmanagerupgrade" ]; then + echo "Upgrading packages: $RPMMANAGERPACKAGES
" + if [ "$rpmmanagermode" = "environment" ]; then + $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "sudo rpm -U $installpackages $rpmforceadd" + else + sudo rpm -U $installpackages $rpmforceadd + fi + fi + RET=$? + else + echo "ERROR: no packages to install." + RET=1 + fi + else + echo "ERROR: install capability disabled for user." + RET=1 + fi ;; + *) RET=0 ;; +esac + +if [ "$REQUEST" != "" ]; then + if [ "$REQUEST" != "showchangelogs" -a "$REQUEST" != "showbuilddocs" -a "$REQUEST" != "showlicenses" ]; then + echo -n "
" + fi + if [ $RET -eq 0 ]; then + echo "Result: OK" + elif [ $RET -gt 0 ]; then + echo "Result: ERROR ($RET)" + fi + echo -n "
" + echo -n "]]>
" + # editor controls + if [ $RET -le 0 -a "$SPECAVAILABLE" -a ! "$MAINTAINERMODE" ]; then + print_editorcontrols + fi + + if [ "$PACKAGE" ]; then + if [ "$STATE_ADVANCEDCONTROLS" -o "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then + print_showlogcontrols + fi + fi + +fi + +if [ "$MAINTAINERMODE" = "true" ]; then + echo -n " " + echo -n "" + if [ "$REPOSITORY" ]; then + echo -n "Repository maintenance:
" +# echo -n "select/unselect all" + echo -n "
" + ls $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm | sort -f | while read f; do + [ -r $f ] || continue + pkgname=`basename $f` + pkgname=${pkgname/.src.rpm} + pkgrel=${pkgname/*-} + pkgname=${pkgname/-$pkgrel} + pkgver=${pkgname/*-} + pkgname=${pkgname/-$pkgver} + if [ "$PACKAGE" = "$pkgname" ]; then + SELECTED="selected=\"selected\""; +# REQUEST="changesrpm" + else + SELECTED= + fi + echo -n "" + done + echo -n "
" + echo -n "Origin: $REPOSITORY" + # repository sync + echo -n " $REPOSITORY updates immediately available from public server?"`\"" + echo -n "); class=redbutton>" + echo -n "
Destination: " + echo -n "
" + # repository compare + echo -n "" + # repository import + echo -n ""`\"+p+\"`cgi_encodevar " from $REPOSITORY to "`\"+getSelectedValueById('repositoryimportto')+" + echo -n "\"`cgi_encodevar "?"`\"" + echo -n "); class=redbutton>" + # repository release + echo -n ""`\"+p+\"`cgi_encodevar " in $REPOSITORY to "`\"+getSelectedValueById('repositoryimportto')+" + echo -n "\"`cgi_encodevar "?"`\"" + echo -n "); class=redbutton>" + # repository archive + echo -n ""`\"+p+\"`cgi_encodevar " in $REPOSITORY?"`\"" + echo -n "); class=redbutton>" + # mass rebuild + echo -n ""`\"+p+\"`cgi_encodevar " from $REPOSITORY and send to "`\"+getSelectedValueById('repositoryimportto')+" + echo -n "\"`cgi_encodevar "?"`\"" + echo -n "); class=redbutton>" + echo -n " Changelog:" + echo -n "" + # force checkbox + echo -n "" + # simulate checkbox + echo -n "" + fi + echo -n "]]>
" +fi + +echo -n "" +if [ "$MAINTAINERMODE" = "true" ]; then + [ "$REPOSITORY" ] && echo -n "$REPOSITORY " || echo -n "no repository " + echo -n "(Maintainer mode)" +else + [ "$PACKAGE" ] && { + echo -n "$PACKAGE " + [ "${SPECVAR_Epoch[0]}" ] && echo -n "${SPECVAR_Epoch[0]}:" + echo -n "$SPECVAR_Version-$SPECVAR_Release " || echo -n "no package " + echo -n "(" + print_environment_descr $ENVIRONMENT + echo -n ")" + } +fi + +echo -n " :: openmamba webbuild" +echo "" diff --git a/cgi-bin/webbuild-buildvm01.cgi b/cgi-bin/webbuild-buildvm01.cgi new file mode 100755 index 0000000..0e094c4 --- /dev/null +++ b/cgi-bin/webbuild-buildvm01.cgi @@ -0,0 +1,19 @@ +#!/bin/bash +WEBBUILD_HOST=buildvm01 +if [ "$QUERY_STRING" ]; then + # get (download, preserve content-type and content-disposition headrs) + contentdisposition=`curl -4 --connect-timeout 20 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition` + echo "\ +$contentdisposition +Content-Type: application/octet-stream +" + stdbuf -oL curl -4 --connect-timeout 20 "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" +else + echo "\ +Content-Type: text/xml +Pragma: no-cache + +" + + stdbuf -oL curl -4 --connect-timeout 20 "http://$WEBBUILD_HOST/cgi-bin/webbuild" -H "Content-Type: $CONTENT_TYPE" --data-binary @- --stderr /dev/null +fi diff --git a/cgi-bin/webbuild-buildvm02.cgi b/cgi-bin/webbuild-buildvm02.cgi new file mode 100755 index 0000000..a3f6d86 --- /dev/null +++ b/cgi-bin/webbuild-buildvm02.cgi @@ -0,0 +1,19 @@ +#!/bin/bash +WEBBUILD_HOST=buildvm02 +if [ "$QUERY_STRING" ]; then + # get (download, preserve content-type and content-disposition headrs) + contentdisposition=`curl -4 --connect-timeout 20 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition` + echo "\ +$contentdisposition +Content-Type: application/octet-stream +" + stdbuf -oL curl -4 --connect-timeout 20 "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" +else + echo "\ +Content-Type: text/xml +Pragma: no-cache + +" + + stdbuf -oL curl -4 --connect-timeout 20 "http://$WEBBUILD_HOST/cgi-bin/webbuild" -H "Content-Type: $CONTENT_TYPE" --data-binary @- --stderr /dev/null +fi diff --git a/cgi-bin/webbuild-webbuild-arm.cgi b/cgi-bin/webbuild-webbuild-arm.cgi new file mode 100755 index 0000000..af14abd --- /dev/null +++ b/cgi-bin/webbuild-webbuild-arm.cgi @@ -0,0 +1,19 @@ +#!/bin/bash +WEBBUILD_HOST=webbuild-arm +if [ "$QUERY_STRING" ]; then + # get (download, preserve content-type and content-disposition headrs) + contentdisposition=`curl -4 --connect-timeout 40 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition` + echo "\ +$contentdisposition +Content-Type: application/octet-stream +" + stdbuf -oL curl -4 --connect-timeout 40 "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" +else + echo "\ +Content-Type: text/xml +Pragma: no-cache + +" + + stdbuf -oL curl -4 --connect-timeout 40 "http://$WEBBUILD_HOST/cgi-bin/webbuild" -H "Content-Type: $CONTENT_TYPE" --data-binary @- --stderr /dev/null +fi diff --git a/functions.php b/functions.php index d578052..9ef75d8 100644 --- a/functions.php +++ b/functions.php @@ -9,7 +9,7 @@ if ( !defined( 'ABSPATH' ) ) { add_action('wp_print_styles', 'add_custom_font'); function add_custom_font() { - $url = '/wp-content/themes/openmamba/fonts/comfortaa-regular/stylesheet.css'; + $url = get_stylesheet_directory_uri() . '/fonts/comfortaa-regular/stylesheet.css'; wp_register_style('comfortaaregular', $url); wp_enqueue_style('comfortaaregular'); wp_register_style('comfortaalight', $url); @@ -100,6 +100,20 @@ function openmamba_download_func( $atts ) { } add_shortcode('openmamba_download', 'openmamba_download_func'); +function openmamba_webbuild_func( $atts ) { + + $a = shortcode_atts( array( + 'host' => 'buildvm02' + ), $atts ); + print ''; + + $file = fopen(get_stylesheet_directory() . '/webbuild.html.inc', "r"); + print fread($file, 20000); + flush(); + fclose($file); +} +add_shortcode('openmamba_webbuild', 'openmamba_webbuild_func'); + // bbpress tag cloud add_filter('widget_tag_cloud_args','set_number_tags'); function set_number_tags($args) { diff --git a/header-webbuild.php b/header-webbuild.php new file mode 100644 index 0000000..591478a --- /dev/null +++ b/header-webbuild.php @@ -0,0 +1,143 @@ + + + + + + + +> + + + + + + <?php wp_title( '|', true, 'right' ); ?> + + + + +"; +print "var user = \"" . wp_get_current_user()->user_login . "\";"; +print "var user_email = \"" . wp_get_current_user()->user_email . "\";"; +print "var secret = \"" . wp_get_current_user()->user_pass . "\";"; +print ""; + +print ''; +# styles needed by jScrollPane +print ''; +# jQuery +print ''; +# the mousewheel plugin - optional to provide mousewheel suppor +print ''; +# the jScrollPane script +print ''; +# webbuild css +print ''; +# socialbox +print ''; + +$file = fopen(get_stylesheet_directory() . "/webbuild.js.inc", "r"); +print fread($file, 20000); +fclose($file); + +# wordpress header code +wp_head(); + +# webbuild css +print ''; + +?> + + +> + + +
+ + +
+ +
+ + + + +
+ + \ No newline at end of file diff --git a/images/fail.png b/images/fail.png new file mode 100644 index 0000000000000000000000000000000000000000..561460d601a5646a597149bf2c63e187a63d8e89 GIT binary patch literal 894 zcmV-^1A+XBP)H{e zgve~t#T#qeTi=XX){_9Ek}qU)^9w(f1NF;3=K5+stp*&`L}qjEi(fy}*S9IYz6%tK z0|aoTg5{Yzm_Bv-`t^%{e6&aLua5zSO=EYa|J{*wTefPx5Xdc-kSi9Tm|-QGk!ni7 z&@|k;aNZmH;m6&3rGN4f;47k6GJTmdZQUD8+pS|_{6=|peByhj>RzZb{AhDy=B@tz z0ZZ4QheEh_bE0~7?A)uLGGEpKAl;ch7-|Ta*_kY|xBi^U&(3}D3G>yJnp5d?FXwV7 zdJ-N9gu{_&Tl?CB0N$oA2rq2y?z&VZon+uU_ouV3?PvZC0B#eBaC36F(9t?5WgT;= zl$&=P>Rc>`paTEe%v_JI8~V$3E>8~>!%#T25-T!{rKVY~Iq0C314Q8pV!a+(@&D>iPMhJSXcwD0heJK7NN z!~!eWbqSx)p}T-*3&O0F=vKl6fSOLjHBtlQ`KX$vf7Nk@jxT%106^+`bY3GEz7GfR zL_JV<+H?&q0RxG6=0GBRG^uzHK>$x^{*oj2e)BN=F_EUlBHI&6p-~9PfTwlG3(hGa z%FkGjaZOocpi$UxzNA Ueb)Qkw*UYD07*qoM6N<$f~nH4#Q*>R literal 0 HcmV?d00001 diff --git a/images/inprogress.gif b/images/inprogress.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c5c5c412cc3a0c96c39a785591ab728e113839f GIT binary patch literal 537 zcmZ?wbhEHbCI)Ok@jthp zYe=xOV}PrXo&hr>P>teG78Z7f{|q`H^&n#zSabv$0?uhVHYNU+yqqW_R35-)AjKG- z+Bmgp6>EI_hE+3InHF6>_V{vuj)W%*$N*M$1`dz`j0~JW1_O(ffM@11m4#iN0UItg z@+5e6J-F^UTX0Piby6Sd@Cd1S=lqwXo0~7 z9fpG3Nu_g^Po0|hP_cPgqM8_z!x0)(1Ws0-Ght#4?2(xysKA;OGKryqd4l59a5g!n zS*-?Kra8VH90)%!Ffakbl?@!O3!51v+NFY3gf20N%w%c092m1KJZB}x5)o#x`^3e&2J?J;#O3P>Zg7H_!XN@H{-c zAMigzJldE#m#^9DT%EjHaSU|<2Wx-muI-OagMUFMp_E?x2p319)OTyGKdYJ zkrfw&K-m%p!HBm&zx;roe>(>QSBP~%loWVXXR_xYEfC$%Krzjs#wF5tjIPqu#0f?! zA9DT9C!~#U2?|9wD)2*1mRr$t5Oqy^J2bPIy3IuM7Omkg*i0_6r}7@x*3XhRuRv_c zRY?#PB&oso%XV*#yZ3ssKIXoWW`>Pmk%a)ZF(qQEF)~ zWuLA8q*evM-bpEspKjhLE234c3I>{z(Z)EYZv#&P7L>AtktIzHMPSx0pAQb-SyhD# z5NsRc6nsBCF5e6yYN;xTbqA#(QxGPGZQs!8l$06%^2PYX+ETvxk4yahR~>G(i_Nj= z%5$-zKS?dBuw=O<3Jqas$+ykj#q-^d+c(rzpm_9|BrxT;w5H~2M|K^Mhnu_ICp?Lb z@0q)sE9&O@Qg+RhtOD(S6WFOGPT-xHt&G@u?3?GE8D<>hBe$zIct0000bbVXQn zWMOn=I%9HWVRU5xGB7bPEif`IF)>syF*-0aIyE#cFg7|cFkV0R+yDRoC3HntbYx+4 zWjbwdWNBu305UKzI4v+aEif`vF*Q0fGdeUjEig4YFffE4G?4%R002ovPDHLkV1mLa Br!D{h literal 0 HcmV?d00001 diff --git a/images/wait.gif b/images/wait.gif new file mode 100644 index 0000000000000000000000000000000000000000..39e8f9eb5188a315da430de1d53bbae6aaf5bfce GIT binary patch literal 5672 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 literal 0 HcmV?d00001 diff --git a/scripts/jquery.js b/scripts/jquery.js new file mode 100644 index 0000000..7c24308 --- /dev/null +++ b/scripts/jquery.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/scripts/jquery.jscrollpane.css b/scripts/jquery.jscrollpane.css new file mode 100644 index 0000000..a051cae --- /dev/null +++ b/scripts/jquery.jscrollpane.css @@ -0,0 +1,120 @@ +/* + * CSS Styles that are needed by jScrollPane for it to operate correctly. + * + * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane + * may not operate correctly without them. + */ + +.jspContainer +{ + overflow: hidden; + position: relative; +} + +.jspPane +{ + position: absolute; +} + +.jspVerticalBar +{ + position: absolute; + top: 0; + right: 0; + width: 16px; + height: 100%; + background: red; +} + +.jspHorizontalBar +{ + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 16px; + background: red; +} + +.jspVerticalBar *, +.jspHorizontalBar * +{ + margin: 0; + padding: 0; +} + +.jspCap +{ + display: none; +} + +.jspHorizontalBar .jspCap +{ + float: left; +} + +.jspTrack +{ + background: #dde; + position: relative; +} + +.jspDrag +{ + background: #bbd; + position: relative; + top: 0; + left: 0; + cursor: pointer; +} + +.jspHorizontalBar .jspTrack, +.jspHorizontalBar .jspDrag +{ + float: left; + height: 100%; +} + +.jspArrow +{ + background: #50506d; + text-indent: -20000px; + display: block; + cursor: pointer; +} + +.jspArrow.jspDisabled +{ + cursor: default; + background: #80808d; +} + +.jspVerticalBar .jspArrow +{ + height: 16px; +} + +.jspHorizontalBar .jspArrow +{ + width: 16px; + float: left; + height: 100%; +} + +.jspVerticalBar .jspArrow:focus +{ + outline: none; +} + +.jspCorner +{ + background: #eeeef4; + float: left; + height: 100%; +} + +/* Yuk! CSS Hack for IE6 3 pixel bug :( */ +* html .jspCorner +{ + margin: 0 -3px 0 0; +} \ No newline at end of file diff --git a/scripts/jquery.jscrollpane.min.js b/scripts/jquery.jscrollpane.min.js new file mode 100644 index 0000000..e34ffd6 --- /dev/null +++ b/scripts/jquery.jscrollpane.min.js @@ -0,0 +1,11 @@ +/* + * jScrollPane - v2.0.0beta12 - 2012-07-24 + * http://jscrollpane.kelvinluck.com/ + * + * Copyright (c) 2010 Kelvin Luck + * Dual licensed under the MIT and GPL licenses. + */ +(function(b,a,c){b.fn.jScrollPane=function(e){function d(D,O){var ay,Q=this,Y,aj,v,al,T,Z,y,q,az,aE,au,i,I,h,j,aa,U,ap,X,t,A,aq,af,am,G,l,at,ax,x,av,aH,f,L,ai=true,P=true,aG=false,k=false,ao=D.clone(false,false).empty(),ac=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aH=D.css("paddingTop")+" "+D.css("paddingRight")+" "+D.css("paddingBottom")+" "+D.css("paddingLeft");f=(parseInt(D.css("paddingLeft"),10)||0)+(parseInt(D.css("paddingRight"),10)||0);function ar(aQ){var aL,aN,aM,aJ,aI,aP,aO=false,aK=false;ay=aQ;if(Y===c){aI=D.scrollTop();aP=D.scrollLeft();D.css({overflow:"hidden",padding:0});aj=D.innerWidth()+f;v=D.innerHeight();D.width(aj);Y=b('
').css("padding",aH).append(D.children());al=b('
').css({width:aj+"px",height:v+"px"}).append(Y).appendTo(D)}else{D.css("width","");aO=ay.stickToBottom&&K();aK=ay.stickToRight&&B();aJ=D.innerWidth()+f!=aj||D.outerHeight()!=v;if(aJ){aj=D.innerWidth()+f;v=D.innerHeight();al.css({width:aj+"px",height:v+"px"})}if(!aJ&&L==T&&Y.outerHeight()==Z){D.width(aj);return}L=T;Y.css("width","");D.width(aj);al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Y.css("overflow","auto");if(aQ.contentWidth){T=aQ.contentWidth}else{T=Y[0].scrollWidth}Z=Y[0].scrollHeight;Y.css("overflow","");y=T/aj;q=Z/v;az=q>1;aE=y>1;if(!(aE||az)){D.removeClass("jspScrollable");Y.css({top:0,width:al.width()-f});n();E();R();w()}else{D.addClass("jspScrollable");aL=ay.maintainPosition&&(I||aa);if(aL){aN=aC();aM=aA()}aF();z();F();if(aL){N(aK?(T-aj):aN,false);M(aO?(Z-v):aM,false)}J();ag();an();if(ay.enableKeyboardNavigation){S()}if(ay.clickOnTrack){p()}C();if(ay.hijackInternalLinks){m()}}if(ay.autoReinitialise&&!av){av=setInterval(function(){ar(ay)},ay.autoReinitialiseDelay)}else{if(!ay.autoReinitialise&&av){clearInterval(av)}}aI&&D.scrollTop(0)&&M(aI,false);aP&&D.scrollLeft(0)&&N(aP,false);D.trigger("jsp-initialised",[aE||az])}function aF(){if(az){al.append(b('
').append(b('
'),b('
').append(b('
').append(b('
'),b('
'))),b('
')));U=al.find(">.jspVerticalBar");ap=U.find(">.jspTrack");au=ap.find(">.jspDrag");if(ay.showArrows){aq=b('').bind("mousedown.jsp",aD(0,-1)).bind("click.jsp",aB);af=b('').bind("mousedown.jsp",aD(0,1)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){aq.bind("mouseover.jsp",aD(0,-1,aq));af.bind("mouseover.jsp",aD(0,1,af))}ak(ap,ay.verticalArrowPositions,aq,af)}t=v;al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){t-=b(this).outerHeight()});au.hover(function(){au.addClass("jspHover")},function(){au.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);au.addClass("jspActive");var s=aI.pageY-au.position().top;b("html").bind("mousemove.jsp",function(aJ){V(aJ.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});o()}}function o(){ap.height(t+"px");I=0;X=ay.verticalGutter+ap.outerWidth();Y.width(aj-X-f);try{if(U.position().left===0){Y.css("margin-left",X+"px")}}catch(s){}}function z(){if(aE){al.append(b('
').append(b('
'),b('
').append(b('
').append(b('
'),b('
'))),b('
')));am=al.find(">.jspHorizontalBar");G=am.find(">.jspTrack");h=G.find(">.jspDrag");if(ay.showArrows){ax=b('').bind("mousedown.jsp",aD(-1,0)).bind("click.jsp",aB);x=b('').bind("mousedown.jsp",aD(1,0)).bind("click.jsp",aB); +if(ay.arrowScrollOnHover){ax.bind("mouseover.jsp",aD(-1,0,ax));x.bind("mouseover.jsp",aD(1,0,x))}ak(G,ay.horizontalArrowPositions,ax,x)}h.hover(function(){h.addClass("jspHover")},function(){h.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);h.addClass("jspActive");var s=aI.pageX-h.position().left;b("html").bind("mousemove.jsp",function(aJ){W(aJ.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});l=al.innerWidth();ah()}}function ah(){al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){l-=b(this).outerWidth()});G.width(l+"px");aa=0}function F(){if(aE&&az){var aI=G.outerHeight(),s=ap.outerWidth();t-=aI;b(am).find(">.jspCap:visible,>.jspArrow").each(function(){l+=b(this).outerWidth()});l-=s;v-=s;aj-=aI;G.parent().append(b('
').css("width",aI+"px"));o();ah()}if(aE){Y.width((al.outerWidth()-f)+"px")}Z=Y.outerHeight();q=Z/v;if(aE){at=Math.ceil(1/y*l);if(at>ay.horizontalDragMaxWidth){at=ay.horizontalDragMaxWidth}else{if(atay.verticalDragMaxHeight){A=ay.verticalDragMaxHeight}else{if(AaS){Q.scrollByY(-aP)}else{V(aS)}}else{if(aM>0){if(I+aQaS){Q.scrollByX(-aP)}else{W(aS)}}else{if(aM>0){if(aa+aQi){s=i}}if(aI===c){aI=ay.animateScroll}if(aI){Q.animate(au,"top",s,ad)}else{au.css("top",s);ad(s)}}function ad(aI){if(aI===c){aI=au.position().top}al.scrollTop(0);I=aI;var aL=I===0,aJ=I==i,aK=aI/i,s=-aK*(Z-v);if(ai!=aL||aG!=aJ){ai=aL;aG=aJ;D.trigger("jsp-arrow-change",[ai,aG,P,k])}u(aL,aJ);Y.css("top",s);D.trigger("jsp-scroll-y",[-s,aL,aJ]).trigger("scroll")}function W(aI,s){if(!aE){return}if(aI<0){aI=0}else{if(aI>j){aI=j}}if(s===c){s=ay.animateScroll}if(s){Q.animate(h,"left",aI,ae) +}else{h.css("left",aI);ae(aI)}}function ae(aI){if(aI===c){aI=h.position().left}al.scrollTop(0);aa=aI;var aL=aa===0,aK=aa==j,aJ=aI/j,s=-aJ*(T-aj);if(P!=aL||k!=aK){P=aL;k=aK;D.trigger("jsp-arrow-change",[ai,aG,P,k])}r(aL,aK);Y.css("left",s);D.trigger("jsp-scroll-x",[-s,aL,aK]).trigger("scroll")}function u(aI,s){if(ay.showArrows){aq[aI?"addClass":"removeClass"]("jspDisabled");af[s?"addClass":"removeClass"]("jspDisabled")}}function r(aI,s){if(ay.showArrows){ax[aI?"addClass":"removeClass"]("jspDisabled");x[s?"addClass":"removeClass"]("jspDisabled")}}function M(s,aI){var aJ=s/(Z-v);V(aJ*i,aI)}function N(aI,s){var aJ=aI/(T-aj);W(aJ*j,s)}function ab(aV,aQ,aJ){var aN,aK,aL,s=0,aU=0,aI,aP,aO,aS,aR,aT;try{aN=b(aV)}catch(aM){return}aK=aN.outerHeight();aL=aN.outerWidth();al.scrollTop(0);al.scrollLeft(0);while(!aN.is(".jspPane")){s+=aN.position().top;aU+=aN.position().left;aN=aN.offsetParent();if(/^body|html$/i.test(aN[0].nodeName)){return}}aI=aA();aO=aI+v;if(saO){aR=s-v+aK+ay.verticalGutter}}if(aR){M(aR,aJ)}aP=aC();aS=aP+aj;if(aUaS){aT=aU-aj+aL+ay.horizontalGutter}}if(aT){N(aT,aJ)}}function aC(){return -Y.position().left}function aA(){return -Y.position().top}function K(){var s=Z-v;return(s>20)&&(s-aA()<10)}function B(){var s=T-aj;return(s>20)&&(s-aC()<10)}function ag(){al.unbind(ac).bind(ac,function(aL,aM,aK,aI){var aJ=aa,s=I;Q.scrollBy(aK*ay.mouseWheelSpeed,-aI*ay.mouseWheelSpeed,false);return aJ==aa&&s==I})}function n(){al.unbind(ac)}function aB(){return false}function J(){Y.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(s){ab(s.target,false)})}function E(){Y.find(":input,a").unbind("focus.jsp")}function S(){var s,aI,aK=[];aE&&aK.push(am[0]);az&&aK.push(U[0]);Y.focus(function(){D.focus()});D.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(aN){if(aN.target!==this&&!(aK.length&&b(aN.target).closest(aK).length)){return}var aM=aa,aL=I;switch(aN.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:s=aN.keyCode;aJ();break;case 35:M(Z-v);s=null;break;case 36:M(0);s=null;break}aI=aN.keyCode==s&&aM!=aa||aL!=I;return !aI}).bind("keypress.jsp",function(aL){if(aL.keyCode==s){aJ()}return !aI});if(ay.hideFocus){D.css("outline","none");if("hideFocus" in al[0]){D.attr("hideFocus",true)}}else{D.css("outline","");if("hideFocus" in al[0]){D.attr("hideFocus",false)}}function aJ(){var aM=aa,aL=I;switch(s){case 40:Q.scrollByY(ay.keyboardSpeed,false);break;case 38:Q.scrollByY(-ay.keyboardSpeed,false);break;case 34:case 32:Q.scrollByY(v*ay.scrollPagePercent,false);break;case 33:Q.scrollByY(-v*ay.scrollPagePercent,false);break;case 39:Q.scrollByX(ay.keyboardSpeed,false);break;case 37:Q.scrollByX(-ay.keyboardSpeed,false);break}aI=aM!=aa||aL!=I;return aI}}function R(){D.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function C(){if(location.hash&&location.hash.length>1){var aK,aI,aJ=escape(location.hash.substr(1));try{aK=b("#"+aJ+', a[name="'+aJ+'"]')}catch(s){return}if(aK.length&&Y.find(aJ)){if(al.scrollTop()===0){aI=setInterval(function(){if(al.scrollTop()>0){ab(aK,true);b(document).scrollTop(al.position().top);clearInterval(aI)}},50)}else{ab(aK,true);b(document).scrollTop(al.position().top)}}}}function m(){if(b(document.body).data("jspHijack")){return}b(document.body).data("jspHijack",true);b(document.body).delegate("a[href*=#]","click",function(s){var aI=this.href.substr(0,this.href.indexOf("#")),aK=location.href,aO,aP,aJ,aM,aL,aN;if(location.href.indexOf("#")!==-1){aK=location.href.substr(0,location.href.indexOf("#"))}if(aI!==aK){return}aO=escape(this.href.substr(this.href.indexOf("#")+1));aP;try{aP=b("#"+aO+', a[name="'+aO+'"]')}catch(aQ){return}if(!aP.length){return}aJ=aP.closest(".jspScrollable");aM=aJ.data("jsp");aM.scrollToElement(aP,true);if(aJ[0].scrollIntoView){aL=b(a).scrollTop();aN=aP.offset().top;if(aNaL+b(a).height()){aJ[0].scrollIntoView()}}s.preventDefault() +})}function an(){var aJ,aI,aL,aK,aM,s=false;al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(aN){var aO=aN.originalEvent.touches[0];aJ=aC();aI=aA();aL=aO.pageX;aK=aO.pageY;aM=false;s=true}).bind("touchmove.jsp",function(aQ){if(!s){return}var aP=aQ.originalEvent.touches[0],aO=aa,aN=I;Q.scrollTo(aJ+aL-aP.pageX,aI+aK-aP.pageY);aM=aM||Math.abs(aL-aP.pageX)>5||Math.abs(aK-aP.pageY)>5;return aO==aa&&aN==I}).bind("touchend.jsp",function(aN){s=false}).bind("click.jsp-touchclick",function(aN){if(aM){aM=false;return false}})}function g(){var s=aA(),aI=aC();D.removeClass("jspScrollable").unbind(".jsp");D.replaceWith(ao.append(Y.children()));ao.scrollTop(s);ao.scrollLeft(aI);if(av){clearInterval(av)}}b.extend(Q,{reinitialise:function(aI){aI=b.extend({},ay,aI);ar(aI)},scrollToElement:function(aJ,aI,s){ab(aJ,aI,s)},scrollTo:function(aJ,s,aI){N(aJ,aI);M(s,aI)},scrollToX:function(aI,s){N(aI,s)},scrollToY:function(s,aI){M(s,aI)},scrollToPercentX:function(aI,s){N(aI*(T-aj),s)},scrollToPercentY:function(aI,s){M(aI*(Z-v),s)},scrollBy:function(aI,s,aJ){Q.scrollByX(aI,aJ);Q.scrollByY(s,aJ)},scrollByX:function(s,aJ){var aI=aC()+Math[s<0?"floor":"ceil"](s),aK=aI/(T-aj);W(aK*j,aJ)},scrollByY:function(s,aJ){var aI=aA()+Math[s<0?"floor":"ceil"](s),aK=aI/(Z-v);V(aK*i,aJ)},positionDragX:function(s,aI){W(s,aI)},positionDragY:function(aI,s){V(aI,s)},animate:function(aI,aL,s,aK){var aJ={};aJ[aL]=s;aI.animate(aJ,{duration:ay.animateDuration,easing:ay.animateEase,queue:false,step:aK})},getContentPositionX:function(){return aC()},getContentPositionY:function(){return aA()},getContentWidth:function(){return T},getContentHeight:function(){return Z},getPercentScrolledX:function(){return aC()/(T-aj)},getPercentScrolledY:function(){return aA()/(Z-v)},getIsScrollableH:function(){return aE},getIsScrollableV:function(){return az},getContentPane:function(){return Y},scrollToBottom:function(s){V(i,s)},hijackInternalLinks:b.noop,destroy:function(){g()}});ar(O)}e=b.extend({},b.fn.jScrollPane.defaults,e);b.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){e[this]=e[this]||e.speed});return this.each(function(){var f=b(this),g=f.data("jsp");if(g){g.reinitialise(e)}else{b("script",f).filter('[type="text/javascript"],not([type])').remove();g=new d(f,e);f.data("jsp",g)}})};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this); \ No newline at end of file diff --git a/scripts/jquery.mousewheel.js b/scripts/jquery.mousewheel.js new file mode 100644 index 0000000..38b6095 --- /dev/null +++ b/scripts/jquery.mousewheel.js @@ -0,0 +1,84 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ + +(function($) { + +var types = ['DOMMouseScroll', 'mousewheel']; + +if ($.event.fixHooks) { + for ( var i=types.length; i; ) { + $.event.fixHooks[ types[--i] ] = $.event.mouseHooks; + } +} + +$.event.special.mousewheel = { + setup: function() { + if ( this.addEventListener ) { + for ( var i=types.length; i; ) { + this.addEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i=types.length; i; ) { + this.removeEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + } +}; + +$.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + }, + + unmousewheel: function(fn) { + return this.unbind("mousewheel", fn); + } +}); + + +function handler(event) { + var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; + event = $.event.fix(orgEvent); + event.type = "mousewheel"; + + // Old school scrollwheel delta + if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } + if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } + + // New school multidimensional scroll (touchpads) deltas + deltaY = delta; + + // Gecko + if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaY = 0; + deltaX = -1*delta; + } + + // Webkit + if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } + if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + return ($.event.dispatch || $.event.handle).apply(this, args); +} + +})(jQuery); diff --git a/scripts/socialbox.js b/scripts/socialbox.js new file mode 100644 index 0000000..077e235 --- /dev/null +++ b/scripts/socialbox.js @@ -0,0 +1,109 @@ +var webbuildhost = "" +//var url = "http://buildvm01.openmamba.org/cgi-bin/webbuild" +var url = "/cgi-bin/webbuild.cgi" + +/*function socialbox_refresh_times() { + socialbox_refresh_times(false); +}*/ + +var socialbox_fullrefresh_count = 0; + +function socialbox_refresh_times() { + var times = document.getElementsByName("socialtime"); + var datenow = new Date(); + var utcnow = parseInt(Date.UTC(datenow.getUTCFullYear(), datenow.getUTCMonth(), datenow.getUTCDate(), + datenow.getUTCHours(), datenow.getUTCMinutes(), datenow.getUTCSeconds()) / 1000); + for (var i = 0; i < times.length; i++) { + if (times[i].attributes[0].name == "time") { + var socialtime = times[i].attributes[0].value; + } else { + var socialtime = times[i].attributes[1].value; + } + var timeago = utcnow - socialtime; + if ((times[i].innerHTML == "") || + (timeago <= 120) || // update every 15 secs if < 2 min + (timeago <= 7200 && (socialbox_fullrefresh_count % 4 == 0)) || // update every minute if < 120 min + (timeago <= 86400 && (socialbox_fullrefresh_count % 120 == 0)) || // update every thirty minutes if < 1 day + (socialbox_fullrefresh_count >= 240)) // else update all every hour + { + var daysago = parseInt(timeago / 86400); + var hoursago = parseInt(timeago / 3600 % 24); + var minutesago = parseInt(timeago / 60 % 60); + var secondsago = parseInt(timeago % 60); + times[i].innerHTML = "("; + if (daysago > 1) times[i].innerHTML += daysago + " days"; + else if (daysago == 1) times[i].innerHTML += "1 day, " + hoursago + " hours"; + else if (hoursago > 1) times[i].innerHTML += hoursago + " hours"; + else if (hoursago == 1) times[i].innerHTML += "1 hour, " + minutesago + " minutes"; + else if (minutesago > 1) times[i].innerHTML += minutesago + " minutes"; + else if (minutesago == 1) times[i].innerHTML += "1 minute, " + secondsago + " seconds"; + else times[i].innerHTML += secondsago + " seconds"; + times[i].innerHTML += " ago) "; + } + } + if (socialbox_fullrefresh_count++ >= 240) socialbox_fullrefresh_count = 0; +} + +var socialbox_interval = null; +var socialbox_reloadtime = 15000; + +function ajax_getvalues_refresh(request,user,user_email,secret) { + var url = "/cgi-bin/webbuild.cgi" +// var url = "http://buildvm01.openmamba.org/cgi-bin/webbuild" + if (typeof webbuildhost != 'undefined' && webbuildhost != "") { + url = "/cgi-bin/webbuild-" + webbuildhost + ".cgi"; + } + + var fromid = 0; + if (socialbox_interval != null) { + clearInterval(socialbox_interval); + } + if (document.getElementsByName("social").length > 0) { + if (document.getElementsByName("social")[0].attributes[0].name == "sid") { + fromid = parseInt(document.getElementsByName("social")[0].attributes[0].value) + 1; + } else { + fromid = parseInt(document.getElementsByName("social")[0].attributes[1].value) + 1; + } + } + if (request != "") + request=request+"&REQUEST=refresh&USER="+user+"&USER_EMAIL="+user_email+"&SECRET="+secret+"&FROMID="+fromid; + else + request="REQUEST=refresh&USER="+user+"&USER_EMAIL="+user_email+"&SECRET="+secret+"&FROMID="+fromid; + + if (window.XMLHttpRequest) + xmlhttp1 = new XMLHttpRequest(); + else if (window.ActiveXObject) + xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP"); + else + return; + + xmlhttp1.onreadystatechange = function() { + if (xmlhttp1.readyState != 4) + return; + if (xmlhttp1.responseXML == undefined) { + return; + } + var xmldoc = xmlhttp1.responseXML.documentElement; + var nodes = xmldoc.getElementsByTagName("socialbox")[0].childNodes; + for (var i = 0; i < nodes.length; i++) { + id = nodes[i].attributes[0].value; + document.getElementById("socialbox").innerHTML = + "" + nodes[i].childNodes[0].nodeValue + "" + + document.getElementById("socialbox").innerHTML; +// alert(document.getElementById("socialbox").innerHTML); + } + if (xmldoc.getElementsByTagName("processes")[0] != undefined) { + document.getElementById("processes").innerHTML = xmldoc.getElementsByTagName("processes")[0].childNodes[0].nodeValue; + $(function() { $('.scroll-pane3').jScrollPane({scrollbarWidth:10}); }); + } + $(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); }); +// lastupdate = (+new Date()); + socialbox_refresh_times(); +//alert("refreshed_times"); + } + + xmlhttp1.open("POST", url, true); + xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xmlhttp1.send(request); + socialbox_interval = setInterval("ajax_getvalues_refresh(\"\",\""+user+"\",\""+user_email+"\",\""+secret+"\",\""+webbuildhost+"\")",socialbox_reloadtime); +} diff --git a/style.css b/style.css index 3e19436..17f9e37 100644 --- a/style.css +++ b/style.css @@ -150,7 +150,7 @@ h1 { /* =Links -------------------------------------------------------------- */ a { - color: #59b237; + color: #599037; font-weight: 400; text-decoration: none; } diff --git a/styles/webbuild-post.css b/styles/webbuild-post.css new file mode 100644 index 0000000..c30e745 --- /dev/null +++ b/styles/webbuild-post.css @@ -0,0 +1,66 @@ +webbuild.a { } +.output pre { background: #000000; border:0; padding:0; margin:0; -webkit-box-shadow:none; } +pre { background: none; border:0; padding:0; margin:0; -webkit-box-shadow:none; } +a.webbuild:link { color:#0b0600; text-decoration: none; } +a.webbuild:visited { color:#0b0600; text-decoration: none; } +a.webbuild:active { color:#0b0600; text-decoration: none; } +a.webbuild:hover { text-decoration: underline; } +hr { margin:0; color:black; background: #aaaaaa; } + +label { + white-space:nowrap; +} + +.webbuild input { + font-size: 8pt; + font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif; + padding: 1px; + margin: 1px; +} + +select { + font-size: 8pt; + font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif; + padding: 0; + margin: 1px; + height: 1.5em; + background-color: buttonface; +} + +input[type="text"] { + font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif; + padding: 1px; + margin: 1px; + border: 1px solid #AAAAAA; +} + +input[type="button"] { + font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif; + font-size: 8pt; + font-weight: 400; + padding: 1px; + margin: 1px; + border: 1px solid #AAAAAA; + white-space:nowrap; + line-height: 1.1em; +} + +input[type="button"]:hover { + border: 1px solid #666666; +} +input[type="radio"] { + font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif; + font-size: 7pt; + padding: 0; + margin: 0; +} +input[type="checkbox"] { + font-family:liberationsans,freesans,Arial,Verdana,Helvetica,sans-serif; + vertical-align:middle; + -ms-transform: scale(0.9); + -moz-transform: scale(0.9); + -webkit-transform: scale(0.9); + -o-trasnform: scale(0.9); + padding: 1px; + margin: 1px; +} diff --git a/styles/webbuild.css b/styles/webbuild.css new file mode 100644 index 0000000..a3aeb8f --- /dev/null +++ b/styles/webbuild.css @@ -0,0 +1,318 @@ +.boldbutton { + font-weight: bold; +} +.redbutton { + color: red; +} +.redbutton[disabled] { + color: lightgray; +} +.redboldbutton { + color: red; + font-weight: bold; +} +.redboldbutton[disabled] { + color: lightgray; +} +.screencontainer { + text-align:center; + position:fixed; + z-index:15 !important; + height:100%; + width:100%; + left:0; + top:0; +} + +.opaquebackground { + text-align:center; + position:fixed; + z-index:15 !important; + height:100%; + width:100%; + left:0; + top:0; + background-color:black; + filter: alpha(opacity=75); + -khtml-opacity:0.75; + -webkit-opacity:0.75; + -moz-opacity:0.75; + opacity:0.75; +} + +.questionbox { + display:inline-block; + text-align:center; + position:relative; + font-size:10pt; + padding:5px; + align:center; + margin-top:200px; + margin-right:auto; + margin-left:auto; + width:auto; + background-color:white; + border:2px solid #2b6600; + z-index:20; +} + +.windowcontainer { + text-align:center; + position:fixed; + z-index:10 !important; + height:100%; + width:100%; + left:0; + top:0; +} + +.windowopaquebackground { + text-align:center; + position:fixed; + z-index:10 !important; + height:100%; + width:100%; + left:0; + top:0; + background-color:black; + filter: alpha(opacity=75); + -khtml-opacity:0.75; + -webkit-opacity:0.75; + -moz-opacity:0.75; + opacity:0.75; +} + +.windowbox { + display:inline-block; + position:relative; + font-size:10pt; + padding:5px; + margin:100px; + margin-right:auto; + margin-left:auto; + width:auto; + background-color:white; + border:2px solid #2b6600; + z-index:15; +} + +.multiselect { + font-size:8pt; + border:0px; + padding:0px; + height:130px; + border:1px solid #2b6600; + overflow:auto; + white-space:nowrap; +} + +.multiselect label { + display:block; + white-space:nowrap; + font-weight:400; + padding:0; +} + + +.searchbox { + position:relative; + display:block; + width:215px; + align:center; + left:660px; + top:-25px; +// height:21px; + font-size:8pt; + border:1px solid #2b6600; +// margin:4px; + padding:2px; + background-color: #e0f2d0; +} +.webbuild { + font-size: 8pt; + font-family: liberationsans, freesans, arial, verdana, sans-serif; + line-height: 1.3em; + color: #000000; + margin:0px; +} +.webbuild td { + font-size: 8pt; +} +.webbuild table { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; background-color: rgb(255, 255, 255); } +.webbuild img { border: 0; margin: 0px; vertical-align:middle; } +.webbuild h1 { font-size: 13pt; font-weight: bold; } +.webbuild h2 { font-size: 11pt; font-weight: bold; } +.webbuild h3 { font-size: 10pt; font-weight: bold; margin-top: 20px; margin-bottom: 2px; } +.webbuild h4 { margin:5; margin-right: 10; font-size: 9pt; font-weight: normal; }*/ +.webbuild hr { margin:0; color:white; } +.webbuild div { margin-bottom:1px; padding-bottom:1px; } + +.editor { + width:690px; + height:300px; + border:1px solid #cccccc; + padding:0px; + margin:0px; + font-family:'Courier New', Courier, 'Nimbus Mono L', monospace; + font-size:8pt; +} + +.maintainer { + width:684px; + height:300px; + overflow:auto; + font-size:7pt; + border:1px solid #2b6600; + padding:0; + margin:0; + background-color:white; +} + + +.processes { + float:left; + font-size:7pt; + padding:0px; + height:130px; + line-height: 130%; + margin-bottom: 2px; + border:1px solid #2b6600; +} + +.notes { + width:680px; + font-size:7pt; + border:1px solid #2b6600; + padding:2px; + margin:0; + margin-bottom:2px; + background-color:#ffff00; +} + +.output { + width:680px; + height:300px; + overflow:auto; + overflow-x:hidden; + word-wrap: break-word; + font-family:'Courier New', Courier, 'Nimbus Mono L', monospace; + font-size:8pt; + border:1px solid #2b6600; + padding:2px; + margin:0; + background-color:black; + color:white; +} + +.output a:link { + text-decoration: underline; + color:white; +} + +.output a:visited { + text-decoration: underline; + color:white; +} + +.matrix { + width:100%; + height:100%; + word-wrap: break-word; + overflow:auto; + font-size:7pt; +// border:1px solid #2b6600; + padding-right:-2px; + padding-bottom:-2px; + margin-left:2px; + margin-bottom:2px; +// background-color:#e0f2d0; +/* -moz-column-count: 2; + -moz-column-gap: 1.5em; + -moz-column-rule: none; + -webkit-column-count: 2; + -webkit-column-gap: 1.5em; + -webkit-column-rule: none; + / future proof + column-count: 2; + column-gap: 1.5em; + column-rule: none;*/ +} + +.CodeMirror { + border:1px solid #2b6600; +// font-size:10px; // causes problems +} + +.jspVerticalBar { + width:4px; +} + +.jspHorizontalBar { + height:4px; +} + +.jspDrag { + background: #2b6600; +} + +.scroll-pane { + background-color: #e0f2d0; + height:130px; + width:200px; + overflow:auto; + float:right; +} + +.scroll-pane1 { + height:100px; + width:390px; + overflow:auto; + white-space:nowrap; +} + +.scroll-pane2 { + height:200px; + width:390px; + overflow:auto; +} + +.scroll-pane3 { + background-color: #e0f2d0; + height:130px; + width:685px; + overflow:auto; + float:right; +} + +.scroll-pane3-h { + height:272px; + width:400px; + overflow:auto; + white-space:nowrap; +} + +.scroll-pane3-v { + height:272px; + width:400px; + overflow:auto; +} + +/* socialbox */ +.socialbox { + float:right; + font-size:8pt; + border:0px; + padding:0px; + height:130px; + line-height: 100%; + margin: 0px; + border:1px solid #2b6600; +} + +.socialbox div { + margin-bottom:1px; +} + +.socialbox hr { + margin: 0; +} diff --git a/webbuild-page.php b/webbuild-page.php new file mode 100644 index 0000000..2c21060 --- /dev/null +++ b/webbuild-page.php @@ -0,0 +1,70 @@ + + +
+ + + + + + + + +
> + + + + +
+ + '' ) ); ?> +
+ + + + + +
+ + + + + + + + +
+ + diff --git a/webbuild.html.inc b/webbuild.html.inc new file mode 100644 index 0000000..b350854 --- /dev/null +++ b/webbuild.html.inc @@ -0,0 +1,43 @@ + +
+
+ +build automatici +   - Webbuild - Interfaccia Web per lo sviluppo di openmamba + + + +
+

Il supporto per AJAX non è abilitato nel tuo browser. L'aggiornamento live non sarà disponibile, premi Ricarica per aggiornare la pagina.

+ Caricamento in corso, attendere... +
+ + +
+
+
+
+ +
+

+
+ + + +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/webbuild.js.inc b/webbuild.js.inc new file mode 100644 index 0000000..5a9542d --- /dev/null +++ b/webbuild.js.inc @@ -0,0 +1,220 @@ + + + + + + + + + + + +