Git Repositories

Added a common header and footer to all pages.
authorCyrille Pontvieux <jrd@enialis.net>
Mon, 18 Feb 2013 22:40:12 +0000 (23:40 +0100)
committerCyrille Pontvieux <jrd@enialis.net>
Mon, 18 Feb 2013 22:44:49 +0000 (23:44 +0100)
Added a name to a ssl key.
Added confirmation message on delete.
Added compatibility with IE6, 7 and 8
Added a way to specify during creation that the new repo have read-only access.
Added GET support to post-update script.
A repository configuration can now be edited.

15 files changed:
homegit/gitrepo.sh
src/account.php
src/admin-users.php
src/footer.inc.php [new file with mode: 0644]
src/header.inc.php [new file with mode: 0644]
src/ie7/IE9.js [new file with mode: 0644]
src/ie7/LICENSE [new file with mode: 0644]
src/ie7/blank.gif [new file with mode: 0644]
src/index.php
src/nav.inc.php
src/post-update.php
src/repo-edit.php [new file with mode: 0644]
src/repo-histo.php
src/repo-users.php
src/style.css

index aea512f..fd7e4b3 100755 (executable)
@@ -39,6 +39,10 @@ Action is one of:
    Sync to is done automatically at each commit. Be careful to add git user ssl keys to remote repo.
    Sync from is done automatically after a POST request to post-update.php script with a json variable named 'payload' containing:
      {'repository': {'name', 'url'}
+ - unsync Name from|to url
+   remove sync previously set by 'sync' command.
+ - listsync Name from|to
+   list the url that are synchronized from or to, as defined by 'sync' command.
 EOF
 }
 
@@ -83,7 +87,9 @@ create_repo() {
     cd "$REPO".git
     git --bare init
     git config core.sharedRepository 1
-    [ -n "$DESC" ] && echo "$DESC" > description
+    if [ -n "$DESC" ]; then
+      echo "$DESC" > description
+    fi
   )
 }
 
@@ -129,7 +135,11 @@ set_option() {
   else
     (
       cd "$REPO".git
-      git --bare config "$OPTION" "$OPT_VAL"
+      if [ -n "$OPT_VAL" ]; then
+        git --bare config "$OPTION" "$OPT_VAL"
+      else
+        git --bare config --unset "$OPTION"
+      fi
     )
   fi
 }
@@ -302,7 +312,7 @@ fetch() {
   if [ -f "$NAME".git/fetchremotes ] && grep -q -F "$URL" "$NAME".git/fetchremotes; then
     (
       cd "$NAME".git
-      git fetch --all
+      git fetch "$URL"
     )
   fi
 }
@@ -337,15 +347,25 @@ syncToRepo() {
   NAME="$1"
   URL="$2"
   check_repo "$NAME"
-  HOST=$(basename $(dirname $(echo "$URL" | sed 's,@,/,g;')))
+  HOST=$(echo -n "$URL"|md5sum|cut -d' ' -f1)
   (
     cd "$NAME".git
     git remote add --mirror $HOST "$URL"
   )
   if [ ! -f "$NAME".git/hooks/post-update ]; then
-    echo '#!/bin/sh' > "$NAME".git/hooks/post-update
+    cat <<'EOF' > "$NAME".git/hooks/post-update
+#!/bin/sh
+if [ -d hooks/.post-update.d ]; then
+  for f in hooks/.post-update.d/*; do 
+    [ -x "$f" ] && ./"$f"
+  done
+fi
+EOF
+    chmod +x "$NAME".git/hooks/post-update
+    mkdir -p "$NAME".git/hooks/.post-update.d
   fi
-  echo "git push --quiet $HOST &" >> "$NAME".git/hooks/post-update
+  echo "git push --quiet $HOST &" > "$NAME".git/hooks/.post-update.d/$HOST
+  chmod +x "$NAME".git/hooks/.post-update.d/$HOST
 }
 
 syncFromRepo() {
@@ -355,6 +375,65 @@ syncFromRepo() {
   echo "$URL" >> "$NAME".git/fetchremotes
 }
 
+unsyncRepo() {
+  NAME="$1"
+  DIR="$2"
+  URL="$3"
+  check_repo "$NAME"
+  if [ "$DIR" = "to" ]; then
+    unsyncToRepo "$NAME" "$URL"
+  elif [ "$DIR" = "from" ]; then
+    unsyncFromRepo "$NAME" "$URL"
+  else
+    echo "$DIR is not a correct sync direction. 'to' or 'from' expected." >&2
+    exit 2
+  fi
+}
+
+unsyncToRepo() {
+  NAME="$1"
+  URL="$2"
+  check_repo "$NAME"
+  HOST=$(echo -n "$URL"|md5sum|cut -d' ' -f1)
+  (
+    cd "$NAME".git
+    git remote rm $HOST
+  )
+  [ -f "$NAME".git/hooks/.post-update.d/$HOST ] && rm "$NAME".git/hooks/.post-update.d/$HOST
+  true
+}
+
+unsyncFromRepo() {
+  NAME="$1"
+  URL="$2"
+  check_repo "$NAME"
+  [ -f "$NAME".git/fetchremotes ] && sed -i -n "\,$URL,d; p" "$NAME".git/fetchremotes
+  true
+}
+
+listSyncRepo() {
+  NAME="$1"
+  DIR="$2"
+  check_repo "$NAME"
+  if [ "$DIR" = "to" ]; then
+    (
+      cd "$NAME".git
+      for r in $(git remote); do
+        git config remote.$r.url
+      done
+    )
+  elif [ "$DIR" = "from" ]; then
+    if [ -f "$NAME".git/fetchremotes ]; then
+      cat "$NAME".git/fetchremotes
+    else
+      true
+    fi
+  else
+    echo "$DIR is not a correct sync direction. 'to' or 'from' expected." >&2
+    exit 2
+  fi
+}
+
 ACTION=''
 NAME=''
 REPO=''
@@ -375,7 +454,7 @@ while [ -n "$1" ]; do
       ;;
     *)
       if [ -z "$ACTION" ]; then
-        if echo "$1" | grep -q '^\(create\|destroy\|get\|set\|list-users\|create-user\|change-user\|show-pwd\|destroy-user\|show-users\|add-user\|del-user\|list-keys\|add-key\|del-key\|graph\|fetch\|export\|sync\)$'; then
+        if echo "$1" | grep -q '^\(create\|destroy\|get\|set\|list-users\|create-user\|change-user\|show-pwd\|destroy-user\|show-users\|add-user\|del-user\|list-keys\|add-key\|del-key\|graph\|fetch\|export\|sync\|unsync\|listsync\)$'; then
           ACTION="$1"
           shift
         else
@@ -478,7 +557,7 @@ while [ -n "$1" ]; do
               echo "Unrecognized parameter ($1)" >&2
               exit 1
             fi
-          elif [ "$ACTION" = "sync" ]; then
+          elif [ "$ACTION" = "sync" ] || [ "$ACTION" = "unsync" ]; then
             if [ -z "$SYNCDIRECTION" ]; then
               SYNCDIRECTION="$1"
               shift
@@ -489,6 +568,14 @@ while [ -n "$1" ]; do
               echo "Unrecognized parameter ($1)" >&2
               exit 1
             fi
+          elif [ "$ACTION" = "listsync" ]; then
+            if [ -z "$SYNCDIRECTION" ]; then
+              SYNCDIRECTION="$1"
+              shift
+            else
+              echo "Unrecognized parameter ($1)" >&2
+              exit 1
+            fi
           fi
         fi
       fi
@@ -517,7 +604,7 @@ case "$ACTION" in
     ;;
   set)
     REPO="$NAME"
-    checkparams REPO OPTION OPT_VAL
+    checkparams REPO OPTION
     set_option "$REPO" "$OPTION" "$OPT_VAL"
     ;;
   list-users)
@@ -593,4 +680,14 @@ case "$ACTION" in
     checkparams REPO SYNCDIRECTION URL
     syncRepo "$REPO" "$SYNCDIRECTION" "$URL"
     ;;
+  unsync)
+    REPO="$NAME"
+    checkparams REPO SYNCDIRECTION URL
+    unsyncRepo "$REPO" "$SYNCDIRECTION" "$URL"
+    ;;
+  listsync)
+    REPO="$NAME"
+    checkparams REPO SYNCDIRECTION
+    listSyncRepo "$REPO" "$SYNCDIRECTION"
+    ;;
 esac
index 134c923..d833ca3 100644 (file)
@@ -22,20 +22,14 @@ if (isset($_POST['submit_pwd'])) {
     $errorMsgPwd = "Le mot de passe n'a pas pu être changé.";
   }
 }
+$pageTitle = "$title - $username";
+require('header.inc.php');
 ?>
-<html>
-  <head>
-    <title><?php echo "$title - $username"; ?></title>
-    <link href="style.css" rel="stylesheet" type="text/css" />
-    <link rel="shortcut icon" href="favicon.png" type="image/png"/>
-  </head>
-  <body>
-    <h1><?php echo "$title - $username"; ?></h1>
-    <div id="nav"><a href="index.php">Index</a></div>
     <div id="keys">
       <div class="invite">Les clés SSH de <span><?php echo $username; ?> </span>:</div>
       <table>
         <tr>
+          <th class="name">Nom</th>
           <th class="key">Clé</th>
           <th class="actions">Action</th>
         </tr>
@@ -44,13 +38,18 @@ $keys = gitrepoinfo('list-keys', $username);
 $i = 0;
 foreach ($keys as $key) {
   $i++;
-  $actions = "<a href=\"user-del-key.php?pos=$i\">Supprimer</a>";
-  echo "        <tr><td class=\"key\"><textarea readonly=\"readonly\">$key</textarea></td><td class=\"actions\">$actions</td></tr>\n";
+  $a = preg_split('/[\s]/', $key);
+  if (count($a) >= 3) {
+    $name = htmlspecialchars($a[2]);
+  } else {
+    $name = ' — ';
+  }
+  $actions = "<a class=\"delete\" href=\"user-del-key.php?pos=$i\" onclick=\"return confirm('Êtes vous sûr de vouloir supprimer cette clé ?');\">Supprimer</a>";
+  echo "        <tr><td class=\"keyname\">$name</td><td class=\"key\"><textarea readonly=\"readonly\">$key</textarea></td><td class=\"actions\">$actions</td></tr>\n";
 }
 ?>
       </table>
     </div>
-    <hr/>
     <div class="error"><?php echo $errorMsgKey; ?></div>
     <form id="add-key" action="" method="POST">
       <fieldset>
@@ -60,7 +59,6 @@ foreach ($keys as $key) {
         <input type="submit" name="submit_key" value="Ajouter"/>
       </fieldset>
     </form>
-    <hr/>
     <div class="error"><?php echo $errorMsgPwd; ?></div>
     <form id="change-pwd" action="" method="POST" autocomplete="off">
       <fieldset>
@@ -70,5 +68,4 @@ foreach ($keys as $key) {
         <input type="submit" name="submit_pwd" value="Changer le mot de passe"/>
       </fieldset>
     </form>
-  </body>
-</html>
+<?php require('footer.inc.php'); ?>
index 22be55f..a5b16fb 100644 (file)
@@ -13,16 +13,9 @@ if (isset($_POST['submit_user_add'])) {
     $errorMsg = "L'utilisateur n'a pas pu être ajouté.";
   }
 }
+$pageTitle = "$title - Administration des utilisateurs";
+require('header.inc.php');
 ?>
-<html>
-  <head>
-    <title><?php echo "$title - Administration des utilisateurs"; ?></title>
-    <link href="style.css" rel="stylesheet" type="text/css" />
-    <link rel="shortcut icon" href="favicon.png" type="image/png"/>
-  </head>
-  <body>
-    <h1><?php echo "$title - Administration des utilisateurs"; ?></h1>
-    <div id="nav"><a href="index.php">Index</a></div>
     <div id="users">
       <div class="invite">Les utilisateurs :</div>
       <table>
@@ -33,13 +26,12 @@ if (isset($_POST['submit_user_add'])) {
 <?php
 $users = gitrepoinfo('list-users');
 foreach ($users as $user) {
-  $actions = "<a href=\"user-del.php?user=$user\">Supprimer</a>";
+  $actions = "<a class=\"delete\" href=\"user-del.php?user=$user\" onclick=\"return confirm('Êtes vous sûr de vouloir supprimer l\'utilisateur \'$user\' ?');\">Supprimer</a>";
   echo "        <tr><td class=\"name\">$user</td><td class=\"actions\">$actions</td></tr>\n";
 }
 ?>
       </table>
     </div>
-    <hr/>
     <div class="error"><?php echo $errorMsg; ?></div>
     <form id="add-user" action="" method="POST" autocomplete="off">
       <fieldset>
@@ -49,5 +41,4 @@ foreach ($users as $user) {
         <input type="submit" name="submit_user_add" value="Ajouter l'utilisateur au dépôt"/>
       </fieldset>
     </form>
-  </body>
-</html>
+<?php require('footer.inc.php'); ?>
diff --git a/src/footer.inc.php b/src/footer.inc.php
new file mode 100644 (file)
index 0000000..c9efd30
--- /dev/null
@@ -0,0 +1,3 @@
+  </body>
+</html>
+
diff --git a/src/header.inc.php b/src/header.inc.php
new file mode 100644 (file)
index 0000000..fca7a0e
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title><?php echo $title; ?></title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <link rel="shortcut icon" href="favicon.png" type="image/png"/>
+    <!--[if lt IE 9]>
+    <script src="ie7/IE9.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <h1><?php echo $pageTitle; ?></h1>
+<?php require('nav.inc.php'); ?>
diff --git a/src/ie7/IE9.js b/src/ie7/IE9.js
new file mode 100644 (file)
index 0000000..84659a7
--- /dev/null
@@ -0,0 +1,6 @@
+/*
+  IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards
+  http://code.google.com/p/ie7-js/
+  http://www.opensource.org/licenses/mit-license.php
+*/
+;(function(N,p){var h=N.IE7={version:"2.1(beta4)",toString:bT("[IE7]")};h.compat=9;var t=h.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1]-0;if(/ie7_off/.test(top.location.search)||t<5.5||t>=h.compat)return;var E=t<6,bj=bT(),bx=p.documentElement,B,x,cy="!",U=":link{ie7-link:link}:visited{ie7-link:visited}",cz=/^[\w\.]+[^:]*$/;function bk(c,a){if(cz.test(c))c=(a||"")+c;return c};function by(c,a){c=bk(c,a);return c.slice(0,c.lastIndexOf("/")+1)};var bU=p.scripts[p.scripts.length-1],cA=by(bU.src);try{var V=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}var bl={};function cB(c,a){try{c=bk(c,a);if(!bl[c]){V.open("GET",c,false);V.send();if(V.status==0||V.status==200){bl[c]=V.responseText}}}catch(ex){}return bl[c]||""};var dA=Array.prototype.slice,dB=/%([1-9])/g,cC=/^\s\s*/,cD=/\s\s*$/,cE=/([\/()[\]{}|*+-.,^$?\\])/g,bV=/\bbase\b/,bW=["constructor","toString"],bm;function F(){};F.extend=function(g,f){bm=true;var d=new this;O(d,g);bm=false;var c=d.constructor;function a(){if(!bm)c.apply(this,arguments)};d.constructor=a;a.extend=arguments.callee;O(a,f);a.prototype=d;return a};F.prototype.extend=function(a){return O(this,a)};var P="#",Q="#",bc=".",bn="/",dC=/\\(\d+)/g,cF=/\[(\\.|[^\]\\])+\]|\\.|\(\?/g,cG=/\(/g,cH=/\$(\d+)/,cI=/^\$\d+$/,cJ=/(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g,cK=/^<#\w+>$/,cL=/<#(\w+)>/g,G=F.extend({constructor:function(a){this[bc]=[];this[Q]={};this.merge(a)},add:function(c,a){delete this[bn];if(c instanceof RegExp){c=c.source}if(!this[P+c])this[bc].push(String(c));return this[Q][P+c]=new G.Item(c,a,this)},compile:function(a){if(a||!this[bn]){this[bn]=new RegExp(this,this.ignoreCase?"gi":"g")}return this[bn]},merge:function(c){for(var a in c)this.add(a,c[a])},exec:function(o){var k=this,l=k[bc],m=k[Q],j,i=this.compile(true).exec(o);if(i){var g=0,f=1;while((j=m[P+l[g++]])){var d=f+j.length+1;if(i[f]){if(j.replacement===0){return k.exec(o)}else{var c=i.slice(f,d),a=c.length;while(--a)c[a]=c[a]||"";c[0]={match:c[0],item:j};return c}}f=d}}return null},parse:function(o){o+="";var k=this,l=k[bc],m=k[Q];return o.replace(this.compile(),function(j){var i=[],g,f=1,d=arguments.length;while(--d)i[d]=arguments[d]||"";while((g=m[P+l[d++]])){var c=f+g.length+1;if(i[f]){var a=g.replacement;switch(typeof a){case"function":return a.apply(k,i.slice(f,c));case"number":return i[f+a];default:return a}}f=c}return j})},toString:function(){var g=[],f=this[bc],d=this[Q],c;for(var a=0;c=d[P+f[a]];a++){g[a]=c.source}return"("+g.join(")|(")+")"}},{IGNORE:null,Item:F.extend({constructor:function(k,l,m){var j=k.indexOf("(")===-1?0:G.count(k),i=m.dictionary;if(i&&k.indexOf("<#")!==-1){if(cK.test(k)){var g=i[Q][P+k.slice(2,-1)];k=g.replacement;j=g._5}else{k=i.parse(k)}}if(typeof l=="number")l=String(l);else if(l==null)l=0;if(typeof l=="string"&&cH.test(l)){if(cI.test(l)){var f=l.slice(1)-0;if(f&&f<=j)l=f}else{var d=l,c;l=function(a){if(!c){c=new RegExp(k,"g"+(this.ignoreCase?"i":""))}return a.replace(c,d)}}}this.length=j;this.source=String(k);this.replacement=l}}),count:function(a){return(String(a).replace(cF,"").match(cG)||"").length}}),cM=G.extend({parse:function(f){var d=this[Q];return f.replace(cL,function(c,a){a=d[P+a];return a?a._6:c})},add:function(g,f){if(f instanceof RegExp){f=f.source}var d=f.replace(cJ,cN);if(f.indexOf("(")!==-1){var c=G.count(f)}if(f.indexOf("<#")!==-1){f=this.parse(f);d=this.parse(d)}var a=this.base(g,f);a._6=d;a._5=c||a.length;return a},toString:function(){return"(<#"+this[PATTERNS].join(">)|(<#")+">)"}});function cN(c,a){return a||"(?:"};function O(i,g){if(i&&g){var f=(typeof g=="function"?Function:Object).prototype;var d=bW.length,c;if(bm)while(c=bW[--d]){var a=g[c];if(a!=f[c]){if(bV.test(a)){bX(i,c,a)}else{i[c]=a}}}for(c in g)if(typeof f[c]=="undefined"){var a=g[c];if(i[c]&&typeof a=="function"&&bV.test(a)){bX(i,c,a)}else{i[c]=a}}}return i};function bX(i,g,f){var d=i[g];i[g]=function(){var c=this.base;this.base=d;var a=f.apply(this,arguments);this.base=c;return a}};function cO(f,d){if(!d)d=f;var c={};for(var a in f)c[a]=d[a];return c};function H(g){var f=arguments,d=new RegExp("%([1-"+arguments.length+"])","g");return String(g).replace(d,function(c,a){return a<f.length?f[a]:c})};function bo(c,a){return String(c).match(a)||[]};function bY(a){return String(a).replace(cE,"\\$1")};function bZ(a){return String(a).replace(cC,"").replace(cD,"")};function bT(a){return function(){return a}};var ca=G.extend({ignoreCase:true}),cP=/'/g,cb=/'(\d+)'/g,dD=/\\/g,bz=/\\([nrtf'"])/g,W=[],cc=new ca({"<!\\-\\-|\\-\\->":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":cd,'"(\\\\.|[^"\\\\])*"':cd,"\\s+":" "});function cQ(a){return cc.parse(a).replace(bz,"$1")};function bd(a){return a.replace(cb,cR)};function cd(c){var a=W.length;W[a]=c.slice(1,-1).replace(bz,"$1").replace(cP,"\\'");return"'"+a+"'"};function cR(d,c){var a=W[c];if(a==null)return d;return"'"+W[c]+"'"};function bp(a){return a.indexOf("'")===0?W[a.slice(1,-1)]:a};var cS=new G({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function ce(a){return cS.parse(a)};var cf=[];function bA(a){cT(a);y(N,"onresize",a)};function y(d,c,a){d.attachEvent(c,a);cf.push(arguments)};function cU(d,c,a){try{d.detachEvent(c,a)}catch(ex){}};y(N,"onunload",function(){var a;while(a=cf.pop()){cU(a[0],a[1],a[2])}});function be(d,c,a){if(!d.elements)d.elements={};if(a)d.elements[c.uniqueID]=c;else delete d.elements[c.uniqueID];return a};y(N,"onbeforeprint",function(){if(!h.CSS.print)new cg("print");h.CSS.print.recalc()});var ch=/^\d+(px)?$/i,X=/^\d+%$/,C=function(f,d){if(ch.test(d))return parseInt(d);var c=f.style.left,a=f.runtimeStyle.left;f.runtimeStyle.left=f.currentStyle.left;f.style.left=d||0;d=f.style.pixelLeft;f.style.left=c;f.runtimeStyle.left=a;return d},bB="ie7-",ci=F.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:bj}),bC=[];function cT(a){bC.push(a)};h.recalc=function(){h.HTML.recalc();h.CSS.recalc();for(var a=0;a<bC.length;a++)bC[a]()};function bq(a){return a.currentStyle["ie7-position"]=="fixed"};function bD(c,a){return c.currentStyle[bB+a]||c.currentStyle[a]};function Y(d,c,a){if(d.currentStyle[bB+c]==null){d.runtimeStyle[bB+c]=d.currentStyle[c]}d.runtimeStyle[c]=a};function cj(c){var a=p.createElement(c||"object");a.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";a.ie7_anon=true;return a};var bE="(e.nextSibling&&IE7._1(e,'next'))",ck=bE.replace(/next/g,"previous"),cl="e.nodeName>'@'",cm="if("+cl+"){",cn="(e.nodeName==='FORM'?IE7._0(e,'id'):e.id)",cV=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i,cW=/(.*)(:first-(line|letter))/,cX=/\s/,cY=/((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g,cZ=/(?:\\.|[^,\\])+/g,I=p.styleSheets,bF=[];h.CSS=new(ci.extend({parser:new ca,screen:"",print:"",styles:[],rules:[],pseudoClasses:t<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var c=[];for(var a in this)c.push(a);return c.join("|")}},init:function(){var j="^\x01$",i="\\[class=?[^\\]]*\\]",g=[];if(this.pseudoClasses)g.push(this.pseudoClasses);var f=this.dynamicPseudoClasses.toString();if(f)g.push(f);g=g.join("|");var d=t<7?["[>+~\\[(]|([:.])[\\w-]+\\1"]:[i];if(g)d.push(":("+g+")");this.UNKNOWN=new RegExp(d.join("|")||j,"i");var c=t<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[i],a=c.concat();if(g)a.push(":("+g+")");u.COMPLEX=new RegExp(a.join("|")||j,"ig");if(this.pseudoClasses)c.push(":("+this.pseudoClasses+")");bf.COMPLEX=new RegExp(c.join("|")||j,"i");f="not\\(:"+f.split("|").join("\\)|not\\(:")+"\\)|"+f;bf.MATCH=new RegExp(f?"(.*?):("+f+")(.*)":j,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){y.apply(null,arguments)},addFix:function(c,a){this.parser.add(c,a)},addRecalc:function(i,g,f,d){i=i.source||i;g=new RegExp("([{;\\s])"+i+"\\s*:\\s*"+g+"[^;}]*");var c=this.recalcs.length;if(typeof d=="string")d=i+":"+d;this.addFix(g,function(a){if(typeof d=="function")d=d(a);return(d?d:a)+";ie7-"+a.slice(1)+";ie7_recalc"+c+":1"});this.recalcs.push(arguments);return c},apply:function(){this.getInlineCSS();new cg("screen");this.trash()},createStyleSheet:function(){p.getElementsByTagName("head")[0].appendChild(p.createElement("style"));this.styleSheet=I[I.length-1];this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=U},getInlineCSS:function(){var d=p.getElementsByTagName("style"),c;for(var a=d.length-1;c=d[a];a--){if(!c.disabled&&!c.ie7){c._7=c.innerHTML}}},getText:function(d,c){try{var a=d.cssText}catch(e){a=""}if(V)a=cB(d.href,c)||a;return a},recalc:function(){this.screen.recalc();var q=/ie7_recalc\d+/g,n=U.match(/[{,]/g).length,o=this.styleSheet.rules,k,l,m,j,i,g,f,d,c;for(g=n;k=o[g];g++){var a=k.style.cssText;if(l=a.match(q)){j=J(k.selectorText);if(j.length)for(f=0;f<l.length;f++){c=l[f];m=h.CSS.recalcs[c.slice(10)][2];for(d=0;(i=j[d]);d++){if(i.currentStyle[c])m(i,a)}}}}},refresh:function(){this.styleSheet.cssText=U+this.screen+this.print},trash:function(){for(var c=0;c<I.length;c++){if(!I[c].ie7){try{var a=I[c].cssText}catch(e){a=""}if(a)I[c].cssText=""}}}}));var cg=F.extend({constructor:function(a){this.media=a;this.load();h.CSS[a]=this;h.CSS.refresh()},createRule:function(d,c){var a;if(R&&(a=d.match(R.MATCH))){return new R(a[1],a[2],c)}else if(a=d.match(bf.MATCH)){if(!cV.test(a[0])||bf.COMPLEX.test(a[0])){return new bf(d,a[1],a[2],a[3],c)}}else{return new u(d,c)}return d+" {"+c+"}"},getText:function(){var v=/@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi,Z=/@import[^;\n]+/gi,S=/@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi,ba=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi,K=this,L={};function z(k,l,m,j){var i="";if(!j){m=q(k.media);j=0}if(m==="none"){k.disabled=true;return""}if(m==="all"||m===K.media){try{var g=!!k.cssText}catch(exe){}if(j<3&&g){var f=k.cssText.match(Z);for(var d=0,c;d<k.imports.length;d++){var c=k.imports[d];var a=k._2||k.href;c._2=f[d].replace(S,"");i+=z(c,by(a,l),m,j+1)}}i+=cQ(k.href?n(k,l):k.owningElement._7);i=A(i,K.media)}return i};for(var w=0;w<I.length;w++){var r=I[w];if(!r.disabled&&!r.ie7)this.cssText+=z(r)}function A(c,a){s.value=a;return c.replace(v,s)};function s(d,c,a){c=q(c);switch(c){case"screen":case"print":if(c!==s.value)return"";case"all":return a}return""};function q(d){if(!d)return"all";var c=d.toLowerCase().split(/\s*,\s*/);d="none";for(var a=0;a<c.length;a++){if(c[a]==="all")return"all";if(c[a]==="screen"){if(d==="print")return"all";d="screen"}else if(c[a]==="print"){if(d==="screen")return"all";d="print"}}return d};function n(f,d){var c=f._2||f.href,a=bk(c,d);if(L[a])return"";L[a]=f.disabled?"":o(h.CSS.getText(f,d),by(c,d));return L[a]};function o(c,a){return c.replace(ba,"$1"+a.slice(0,a.lastIndexOf("/")+1)+"$2")}},load:function(){this.cssText="";this.getText();this.parse();if(bF.length){this.cssText=da(this.cssText)}this.cssText=bd(this.cssText);bl={}},parse:function(){var j=h.CSS.parser.parse(this.cssText),o="";this.cssText=j.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g,function(a){o+=a+"\n";return""});this.declarations=bd(o);var k=h.CSS.rules.length,l=[],m;while((m=cY.exec(this.cssText))){var j=m[2];if(j){var i=t<7&&j.indexOf("AlphaImageLoader")!==-1;var g=m[1].match(cZ),f;for(var d=0;f=g[d];d++){f=bZ(f);var c=h.CSS.UNKNOWN.test(f);g[d]=c?this.createRule(f,j):f+"{"+j+"}";if(i)g[d]+=this.createRule(f+">*","position:relative")}l.push(g.join("\n"))}}this.cssText=l.join("\n");this.rules=h.CSS.rules.slice(k)},recalc:function(){var c,a;for(a=0;(c=this.rules[a]);a++)c.recalc()},toString:function(){return this.declarations+"@media "+this.media+"{"+this.cssText+"}"}}),R,u=h.Rule=F.extend({constructor:function(d,c){this.id=h.CSS.rules.length;this.className=u.PREFIX+this.id;var a=d.match(cW);this.selector=(a?a[1]:d)||"*";this.selectorText=this.parse(this.selector)+(a?a[2]:"");this.cssText=c;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");h.CSS.rules.push(this);this.init()},init:bj,add:function(a){a.className+=" "+this.className},recalc:function(){var c=J(this.selector);for(var a=0;a<c.length;a++)this.add(c[a])},parse:function(g){var f=g.replace(u.CHILD," ").replace(u.COMPLEX,"");if(t<7)f=f.replace(u.MULTI,"");var d=bo(f,u.TAGS).length-bo(g,u.TAGS).length,c=bo(f,u.CLASSES).length-bo(g,u.CLASSES).length+1;while(c>0&&u.CLASS.test(f)){f=f.replace(u.CLASS,"");c--}while(d>0&&u.TAG.test(f)){f=f.replace(u.TAG,"$1*");d--}f+="."+this.className;c=Math.min(c,2);d=Math.min(d,2);var a=-10*c-d;if(a>0){f=f+","+u.MAP[a]+" "+f}return f},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return H("%1 {%2}",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\.[\w-]+/,CLASSES:/[.:\[]/g,MULTI:/(\.[\w-]+)+/g,PREFIX:"ie7_class",TAG:/^\w+|([\s>+~])\w+/,TAGS:/^\w|[\s>+~]\w/g,MAP:{"1":"html","2":"html body","10":".ie7_html","11":"html.ie7_html","12":"html.ie7_html body","20":".ie7_html .ie7_body","21":"html.ie7_html .ie7_body","22":"html.ie7_html body.ie7_body"}}),bf=u.extend({constructor:function(g,f,d,c,a){this.negated=d.indexOf("not")===0;if(this.negated)d=d.slice(5,-1);this.attach=f||"*";this.dynamicPseudoClass=h.CSS.dynamicPseudoClasses[d];this.target=c;this.base(g,a)},recalc:function(){var f=J(this.attach),d;for(var c=0;d=f[c];c++){var a=this.target?J(this.target,d):[d];if(a.length)this.dynamicPseudoClass.apply(d,a,this)}}}),M=F.extend({constructor:function(c,a){this.name=c;this.apply=a;this.instances={};h.CSS.dynamicPseudoClasses[c]=this},register:function(g,f){var d=g[2];if(!f&&d.negated){this.unregister(g,true)}else{g.id=d.id+g[0].uniqueID;if(!this.instances[g.id]){var c=g[1],a;for(a=0;a<c.length;a++)d.add(c[a]);this.instances[g.id]=g}}},unregister:function(g,f){var d=g[2];if(!f&&d.negated){this.register(g,true)}else{if(this.instances[g.id]){var c=g[1],a;for(a=0;a<c.length;a++)d.remove(c[a]);delete this.instances[g.id]}}}}),br=new M("hover",function(c){var a=arguments;h.CSS.addEventHandler(c,"onmouseenter",function(){br.register(a)});h.CSS.addEventHandler(c,"onmouseleave",function(){br.unregister(a)})});y(p,"onmouseup",function(){var c=br.instances;for(var a in c)if(!c[a][0].contains(event.srcElement))br.unregister(c[a])});var co={"=":"%1==='%2'","~=":"(' '+%1+' ').indexOf(' %2 ')!==-1","|=":"%1==='%2'||%1.indexOf('%2-')===0","^=":"%1.indexOf('%2')===0","$=":"%1.slice(-'%2'.length)==='%2'","*=":"%1.indexOf('%2')!==-1"};co[""]="%1!=null";var T={"<#attr>":function(g,f,d,c){var a="IE7._0(e,'"+f+"')";c=bp(c);if(d.length>1){if(!c||d==="~="&&cX.test(c)){return"false&&"}a="("+a+"||'')"}return"("+H(co[d],a,c)+")&&"},"<#id>":cn+"==='$1'&&","<#class>":"e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&",":first-child":"!"+ck+"&&",":link":"e.currentStyle['ie7-link']=='link'&&",":visited":"e.currentStyle['ie7-link']=='visited'&&"};h.HTML=new(ci.extend({fixed:{},init:bj,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var f=0;f<this.fixes.length;f++){var d=J(this.fixes[f][0]);var c=this.fixes[f][1];for(var a=0;a<d.length;a++)c(d[a])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var j=0;j<this.recalcs.length;j++){var i=J(this.recalcs[j][0]);var g=this.recalcs[j][1],f;var d=Math.pow(2,j);for(var c=0;(f=i[c]);c++){var a=f.uniqueID;if((this.fixed[a]&d)===0){f=g(f)||f;this.fixed[a]|=d}}}}}));if(t<7){p.createElement("abbr");h.HTML.addRecalc("label",function(c){if(!c.htmlFor){var a=J("input,textarea",c,true);if(a){y(c,"onclick",function(){a.click()})}}})}var bg="[.\\d]";(function(){var v=h.Layout={};U+="*{boxSizing:content-box}";v.boxSizing=function(a){if(!a.currentStyle.hasLayout){a.style.height="0cm";if(a.currentStyle.verticalAlign==="auto")a.runtimeStyle.verticalAlign="top";Z(a)}};function Z(a){if(a!=x&&a.currentStyle.position!=="absolute"){S(a,"marginTop");S(a,"marginBottom")}};function S(g,f){if(!g.runtimeStyle[f]){var d=g.parentElement;var c=f==="marginTop";if(d&&d.currentStyle.hasLayout&&!h._1(g,c?"previous":"next"))return;var a=g[c?"firstChild":"lastChild"];if(a&&a.nodeName<"@")a=h._1(a,c?"next":"previous");if(a&&a.currentStyle.styleFloat==="none"&&a.currentStyle.hasLayout){S(a,f);margin=ba(g,g.currentStyle[f]);childMargin=ba(a,a.currentStyle[f]);if(margin<0||childMargin<0){g.runtimeStyle[f]=margin+childMargin}else{g.runtimeStyle[f]=Math.max(childMargin,margin)}a.runtimeStyle[f]="0px"}}};function ba(c,a){return a==="auto"?0:C(c,a)};var K=/^[.\d][\w]*$/,L=/^(auto|0cm)$/,z={};v.borderBox=function(a){z.Width(a);z.Height(a)};var w=function(r){z.Width=function(a){if(!X.test(a.currentStyle.width))A(a);if(r)Z(a)};function A(c,a){if(!c.runtimeStyle.fixedWidth){if(!a)a=c.currentStyle.width;c.runtimeStyle.fixedWidth=K.test(a)?Math.max(0,n(c,a))+"px":a;Y(c,"width",c.runtimeStyle.fixedWidth)}};function s(c){if(!bq(c)){var a=c.offsetParent;while(a&&!a.currentStyle.hasLayout)a=a.offsetParent}return(a||x).clientWidth};function q(c,a){if(X.test(a))return parseInt(parseFloat(a)/100*s(c));return C(c,a)};var n=function(f,d){var c=f.currentStyle["ie7-box-sizing"]==="border-box",a=0;if(E&&!c)a+=o(f)+k(f,"padding");else if(!E&&c)a-=o(f)+k(f,"padding");return q(f,d)+a};function o(a){return a.offsetWidth-a.clientWidth};function k(c,a){return q(c,c.currentStyle[a+"Left"])+q(c,c.currentStyle[a+"Right"])};U+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";v.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(be(arguments.callee,a,a.currentStyle.minWidth!=="none")){v.boxSizing(a);A(a);l(a)}};eval("IE7.Layout.maxWidth="+String(v.minWidth).replace(/min/g,"max"));function l(d){if(d==p.body){var c=d.clientWidth}else{var a=d.getBoundingClientRect();c=a.right-a.left}if(d.currentStyle.minWidth!=="none"&&c<n(d,d.currentStyle.minWidth)){d.runtimeStyle.width=d.currentStyle.minWidth}else if(d.currentStyle.maxWidth!=="none"&&c>=n(d,d.currentStyle.maxWidth)){d.runtimeStyle.width=d.currentStyle.maxWidth}else{d.runtimeStyle.width=d.runtimeStyle.fixedWidth}};function m(a){if(be(m,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bD(a,"left")!=="auto"&&bD(a,"right")!=="auto"&&L.test(bD(a,"width")))){j(a);v.boxSizing(a)}};v.fixRight=m;function j(d){var c=q(d,d.runtimeStyle._3||d.currentStyle.left),a=s(d)-q(d,d.currentStyle.right)-c-k(d,"margin");if(parseInt(d.runtimeStyle.width)===a)return;d.runtimeStyle.width="";if(bq(d)||r||d.offsetWidth<a){if(!E)a-=o(d)+k(d,"padding");if(a<0)a=0;d.runtimeStyle.fixedWidth=a;Y(d,"width",a)}};var i=0;bA(function(){if(!x)return;var g,f=(i<x.clientWidth);i=x.clientWidth;var d=v.minWidth.elements;for(g in d){var c=d[g];var a=(parseInt(c.runtimeStyle.width)===n(c,c.currentStyle.minWidth));if(f&&a)c.runtimeStyle.width="";if(f==a)l(c)}var d=v.maxWidth.elements;for(g in d){var c=d[g];var a=(parseInt(c.runtimeStyle.width)===n(c,c.currentStyle.maxWidth));if(!f&&a)c.runtimeStyle.width="";if(f!==a)l(c)}for(g in m.elements)j(m.elements[g])});if(E){h.CSS.addRecalc("width",bg,z.Width)}if(t<7){h.CSS.addRecalc("max-width",bg,v.maxWidth);h.CSS.addRecalc("right",bg,m)}else if(t==7){if(r)h.CSS.addRecalc("height","[\\d.]+%",function(element){element.runtimeStyle.pixelHeight=parseInt(s(element)*element.currentStyle["ie7-height"].slice(0,-1)/100)})}};eval("var _8="+ce(w));w();_8(true);if(t<7){h.CSS.addRecalc("min-width",bg,v.minWidth);h.CSS.addFix(/\bmin-height\s*/,"height")}})();var bG=bk("blank.gif",cA),bH="DXImageTransform.Microsoft.AlphaImageLoader",cp="progid:"+bH+"(src='%1',sizingMethod='%2')",bh,bi=[];function cq(c){if(bh.test(c.src)){var a=new Image(c.width,c.height);a.onload=function(){c.width=a.width;c.height=a.height;a=null};a.src=c.src;c.pngSrc=c.src;bs(c)}};if(t<7){h.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(g,f,d,c,a){c=bp(c);return bh.test(c)?"filter:"+H(cp,c,a.indexOf("no-repeat")===-1?"scale":"crop")+";zoom:1;background"+(f||"")+":"+(d||"")+"none"+(a||""):g});h.CSS.addRecalc(/list\-style(\-image)?/,"[^};]*url",function(f){var d=f.currentStyle.listStyleImage.slice(5,-2);if(bh.test(d)){if(f.nodeName==="LI"){cr(f,d)}else if(f.nodeName==="UL"){for(var c=0,a;a=f.childNodes[c];c++){if(a.nodeName==="LI")cr(a,d)}}}});function cr(i,g){var f=i.runtimeStyle,d=i.offsetHeight,c=new Image;c.onload=function(){var a=i.currentStyle.paddingLeft;a=a==="0px"?0:C(i,a);f.paddingLeft=(a+this.width)+"px";f.marginLeft=-this.width+"px";f.listStyleType="none";f.listStyleImage="none";f.paddingTop=Math.max(d-i.offsetHeight,0)+"px";bs(i,"crop",g);i.style.zoom="100%"};c.src=g};h.HTML.addRecalc("img,input",function(a){if(a.nodeName==="INPUT"&&a.type!=="image")return;cq(a);y(a,"onpropertychange",function(){if(!bI&&event.propertyName==="src"&&a.src.indexOf(bG)===-1)cq(a)})});var bI=false;y(N,"onbeforeprint",function(){bI=true;for(var a=0;a<bi.length;a++)db(bi[a])});y(N,"onafterprint",function(){for(var a=0;a<bi.length;a++)bs(bi[a]);bI=false})}function bs(f,d,c){var a=f.filters[bH];if(a){a.src=c||f.src;a.enabled=true}else{f.runtimeStyle.filter=H(cp,c||f.src,d||"scale");bi.push(f)}f.src=bG};function db(a){a.src=a.pngSrc;a.filters[bH].enabled=false};(function(){if(t>=7)return;h.CSS.addRecalc("position","fixed",o,"absolute");h.CSS.addRecalc("background(-attachment)?","[^};]*fixed",q);var z=E?"body":"documentElement";function w(){if(B.currentStyle.backgroundAttachment!=="fixed"){if(B.currentStyle.backgroundImage==="none"){B.runtimeStyle.backgroundRepeat="no-repeat";B.runtimeStyle.backgroundImage="url("+bG+")"}B.runtimeStyle.backgroundAttachment="fixed"}w=bj};var r=cj("img");function A(a){return a?bq(a)||A(a.parentElement):false};function s(d,c,a){setTimeout("document.all."+d.uniqueID+".runtimeStyle.setExpression('"+c+"','"+a+"')",0)};function q(a){if(be(q,a,a.currentStyle.backgroundAttachment==="fixed"&&!a.contains(B))){w();j.bgLeft(a);j.bgTop(a);n(a)}};function n(c){r.src=c.currentStyle.backgroundImage.slice(5,-2);var a=c.canHaveChildren?c:c.parentElement;a.appendChild(r);j.setOffsetLeft(c);j.setOffsetTop(c);a.removeChild(r)};function o(a){if(be(o,a,bq(a))){Y(a,"position","absolute");Y(a,"left",a.currentStyle.left);Y(a,"top",a.currentStyle.top);w();h.Layout.fixRight(a);k(a)}};function k(d,c){p.body.getBoundingClientRect();j.positionTop(d,c);j.positionLeft(d,c,true);if(!d.runtimeStyle.autoLeft&&d.currentStyle.marginLeft==="auto"&&d.currentStyle.right!=="auto"){var a=x.clientWidth-j.getPixelWidth(d,d.currentStyle.right)-j.getPixelWidth(d,d.runtimeStyle._3)-d.clientWidth;if(d.currentStyle.marginRight==="auto")a=parseInt(a/2);if(A(d.offsetParent))d.runtimeStyle.pixelLeft+=a;else d.runtimeStyle.shiftLeft=a}if(!d.runtimeStyle.fixedWidth)j.clipWidth(d);if(!d.runtimeStyle.fixedHeight)j.clipHeight(d)};function l(){var c=q.elements;for(var a in c)n(c[a]);c=o.elements;for(a in c){k(c[a],true);k(c[a],true)}m=0};var m;bA(function(){if(!m)m=setTimeout(l,100)});var j={},i=function(g){g.bgLeft=function(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!A(a)){s(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+z+".scrollLeft)||0")}};g.setOffsetLeft=function(c){var a=A(c)?"backgroundPositionX":"offsetLeft";c.runtimeStyle[a]=g.getOffsetLeft(c,c.style.backgroundPositionX)-c.getBoundingClientRect().left-c.clientLeft+2};g.getOffsetLeft=function(c,a){switch(a){case"left":case"top":return 0;case"right":case"bottom":return x.clientWidth-r.offsetWidth;case"center":return(x.clientWidth-r.offsetWidth)/2;default:if(X.test(a)){return parseInt((x.clientWidth-r.offsetWidth)*parseFloat(a)/100)}r.style.left=a;return r.offsetLeft}};g.clipWidth=function(f){var d=f.runtimeStyle.fixWidth;f.runtimeStyle.borderRightWidth="";f.runtimeStyle.width=d?g.getPixelWidth(f,d)+"px":"";if(f.currentStyle.width!=="auto"){var c=f.getBoundingClientRect();var a=f.offsetWidth-x.clientWidth+c.left-2;if(a>=0){f.runtimeStyle.borderRightWidth="0px";a=Math.max(C(f,f.currentStyle.width)-a,0);Y(f,"width",a);return a}}};g.positionLeft=function(c,a){if(!a&&X.test(c.currentStyle.width)){c.runtimeStyle.fixWidth=c.currentStyle.width}if(c.runtimeStyle.fixWidth){c.runtimeStyle.width=g.getPixelWidth(c,c.runtimeStyle.fixWidth)}c.runtimeStyle.shiftLeft=0;c.runtimeStyle._3=c.currentStyle.left;c.runtimeStyle.autoLeft=c.currentStyle.right!=="auto"&&c.currentStyle.left==="auto";c.runtimeStyle.left="";c.runtimeStyle.screenLeft=g.getScreenLeft(c);c.runtimeStyle.pixelLeft=c.runtimeStyle.screenLeft;if(!a&&!A(c.offsetParent)){s(c,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+z+".scrollLeft")}};g.getScreenLeft=function(d){var c=d.offsetLeft,a=1;if(d.runtimeStyle.autoLeft){c=x.clientWidth-d.offsetWidth-g.getPixelWidth(d,d.currentStyle.right)}if(d.currentStyle.marginLeft!=="auto"){c-=g.getPixelWidth(d,d.currentStyle.marginLeft)}while(d=d.offsetParent){if(d.currentStyle.position!=="static")a=-1;c+=d.offsetLeft*a}return c};g.getPixelWidth=function(c,a){return X.test(a)?parseInt(parseFloat(a)/100*x.clientWidth):C(c,a)}};eval("var _9="+ce(i));i(j);_9(j)})();if(t<7){var bJ={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,borderLeftColor:"#000",borderTopColor:"#000",borderRightColor:"#000",borderBottomColor:"#000",height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};h.CSS.addRecalc("overflow","visible",function(d){if(d.currentStyle.position==="absolute")return;if(d.parentNode.ie7_wrapped)return;if(h.Layout&&d.currentStyle["max-height"]!=="auto"){h.Layout.maxHeight(d)}if(d.currentStyle.marginLeft==="auto")d.style.marginLeft=0;if(d.currentStyle.marginRight==="auto")d.style.marginRight=0;var c=p.createElement(cy);c.ie7_wrapped=d;for(var a in bJ){c.style[a]=d.currentStyle[a];if(bJ[a]!=null){d.runtimeStyle[a]=bJ[a]}}c.style.display="block";c.style.position="relative";d.runtimeStyle.position="absolute";d.parentNode.insertBefore(c,d);c.appendChild(d)})}function dc(){var s="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var q=0;q<s.length;q++){s[s[q]]=s[q-1]||"0.67em"}h.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/,function(f,d,c,a){return d+(s[a]||a)});var n=/^\-/,o=/(em|ex)$/i,k=/em$/i,l=/ex$/i;C=function(d,c){if(ch.test(c))return parseInt(c)||0;var a=n.test(c)?-1:1;if(o.test(c))a*=j(d);m.style.width=a<0?c.slice(1):c;B.appendChild(m);c=a*m.offsetWidth;m.removeNode();return parseInt(c)};var m=cj();function j(d){var c=1;m.style.fontFamily=d.currentStyle.fontFamily;m.style.lineHeight=d.currentStyle.lineHeight;while(d!=B){var a=d.currentStyle["ie7-font-size"];if(a){if(k.test(a))c*=parseFloat(a);else if(X.test(a))c*=(parseFloat(a)/100);else if(l.test(a))c*=(parseFloat(a)/2);else{m.style.fontSize=a;return 1}}d=d.parentElement}return c};h.CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");h.CSS.addFix(/display\s*:\s*list-item/,"display:block");function i(f){var d=f.parentElement,c=d.offsetWidth-f.offsetWidth-g(d),a=(f.currentStyle["ie7-margin"]&&f.currentStyle.marginRight==="auto")||f.currentStyle["ie7-margin-right"]==="auto";switch(d.currentStyle.textAlign){case"right":c=a?parseInt(c/2):0;f.runtimeStyle.marginRight=c+"px";break;case"center":if(a)c=0;default:if(a)c/=2;f.runtimeStyle.marginLeft=parseInt(c)+"px"}};function g(a){return C(a,a.currentStyle.paddingLeft)+C(a,a.currentStyle.paddingRight)};h.CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(a){if(be(i,a,a.parentElement&&a.currentStyle.display==="block"&&a.currentStyle.marginLeft==="auto"&&a.currentStyle.position!=="absolute")){i(a)}});bA(function(){for(var c in i.elements){var a=i.elements[c];a.runtimeStyle.marginLeft=a.runtimeStyle.marginRight="";i(a)}})};var bK="\\([^)]+\\)";cc.add(/::(before|after)/,":$1");if(t<8){if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+="|";h.CSS.pseudoClasses+="before|after|lang"+bK;function da(a){return a.replace(new RegExp("([{;\\s])("+bF.join("|")+")\\s*:\\s*([^;}]+)","g"),"$1$2:$3;ie7-$2:$3")};var dd=/[\w-]+\s*:\s*inherit/g;var de=/ie7\-|\s*:\s*inherit/g;var df=/\-([a-z])/g;function dg(c,a){return a.toUpperCase()};h.CSS.addRecalc("[\\w-]+","inherit",function(g,f){if(g.parentElement){var d=f.match(dd);for(var c=0;c<d.length;c++){var a=d[c].replace(de,"");if(g.currentStyle["ie7-"+a]==="inherit"){a=a.replace(df,dg);g.runtimeStyle[a]=g.parentElement.currentStyle[a]}}}},function(a){bF.push(bY(a.slice(1).split(":")[0]));return a});var bt=new M("focus",function(c){var a=arguments;h.CSS.addEventHandler(c,"onfocus",function(){bt.unregister(a);bt.register(a)});h.CSS.addEventHandler(c,"onblur",function(){bt.unregister(a)});if(c==p.activeElement){bt.register(a)}});var bL=new M("active",function(c){var a=arguments;h.CSS.addEventHandler(c,"onmousedown",function(){bL.register(a)})});y(p,"onmouseup",function(){var c=bL.instances;for(var a in c)bL.unregister(c[a])});var dh=/^url\s*\(\s*([^)]*)\)$/;var di={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"};var R=h.PseudoElement=u.extend({constructor:function(j,i,g){this.position=i;var f=g.match(R.CONTENT),d,c;if(f){f=f[1];d=f.split(/\s+/);for(var a=0;(c=d[a]);a++){d[a]=/^attr/.test(c)?{attr:c.slice(5,-1)}:c.charAt(0)==="'"?bp(c):bd(c)}f=d}this.content=f;this.base(j,bd(g))},init:function(){this.match=J(this.selector);for(var c=0;c<this.match.length;c++){var a=this.match[c].runtimeStyle;if(!a[this.position])a[this.position]={cssText:""};a[this.position].cssText+=";"+this.cssText;if(this.content!=null)a[this.position].content=this.content}},create:function(n){var o=n.runtimeStyle[this.position];if(o){var k=[].concat(o.content||"");for(var l=0;l<k.length;l++){if(typeof k[l]=="object"){k[l]=n.getAttribute(k[l].attr)}}k=k.join("");var m=k.match(dh);var j="overflow:hidden;"+o.cssText.replace(/'/g,'"');var i=di[this.position+Number(n.canHaveChildren)];var g='ie7_pseudo'+R.count++;n.insertAdjacentHTML(i,H(R.ANON,this.className,g,j,m?"":k));if(m){var f=bp(m[1]);var d=p.getElementById(g);d.src=f;bs(d,"crop");var c=n.currentStyle.styleFloat!=="none";if(d.currentStyle.display==="inline"||c){if(t<7&&c&&n.canHaveChildren){n.runtimeStyle.display="inline";n.runtimeStyle.position="relative";d.runtimeStyle.position="absolute"}d.style.display="inline-block";if(n.currentStyle.styleFloat!=="none"){d.style.pixelWidth=n.offsetWidth}var a=new Image;a.onload=function(){d.style.pixelWidth=this.width;d.style.pixelHeight=Math.max(this.height,d.offsetHeight)};a.src=f}}n.runtimeStyle[this.position]=null}},recalc:function(){if(this.content==null)return;for(var a=0;a<this.match.length;a++){this.create(this.match[a])}},toString:function(){return"."+this.className+"{display:inline}"}},{CONTENT:/content\s*:\s*([^;]*)(;|$)/,ANON:"<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>",MATCH:/(.*):(before|after).*/,count:0});h._getLang=function(c){var a="";while(c&&c.nodeType===1){a=c.lang||c.getAttribute("lang")||"";if(a)break;c=c.parentNode}return a};T=O(T,{":lang\\(([^)]+)\\)":"((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&"})}var dj=/^(submit|reset|button)$/;h.HTML.addRecalc("button,input",function(c){if(c.nodeName==="BUTTON"){var a=c.outerHTML.match(/ value="([^"]*)"/i);c.runtimeStyle.value=a?a[1]:""}if(c.type==="submit"){y(c,"onclick",function(){c.runtimeStyle.clicked=true;setTimeout("document.all."+c.uniqueID+".runtimeStyle.clicked=false",1)})}});h.HTML.addRecalc("form",function(d){y(d,"onsubmit",function(){for(var c,a=0;c=d[a];a++){if(dj.test(c.type)&&!c.disabled&&!c.runtimeStyle.clicked){c.disabled=true;setTimeout("document.all."+c.uniqueID+".disabled=false",1)}else if(c.nodeName==="BUTTON"&&c.type==="submit"){setTimeout("document.all."+c.uniqueID+".value='"+c.value+"'",1);c.value=c.runtimeStyle.value}}})});h.HTML.addRecalc("img",function(a){if(a.alt&&!a.title)a.title=""});if(t<8){h.CSS.addRecalc("border-spacing",bg,function(a){if(a.currentStyle.borderCollapse!=="collapse"){a.cellSpacing=C(a,a.currentStyle["ie7-border-spacing"].split(" ")[0])}});h.CSS.addRecalc("box-sizing","content-box",h.Layout.boxSizing);h.CSS.addRecalc("box-sizing","border-box",h.Layout.borderBox)}if(t<8){var dk=/^image/i;h.HTML.addRecalc("object",function(a){if(dk.test(a.type)){a.body.style.cssText="margin:0;padding:0;border:none;overflow:hidden";return a}})}var bM="!IE7._a(e,'next')&&",cs=bM.replace("next","previous");if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+="|";h.CSS.pseudoClasses+="(?:first|last|only)\\-(?:child|of\\-type)|empty|root|target|"+("not|nth\\-child|nth\\-last\\-child|nth\\-of\\-type|nth\\-last\\-of\\-type".split("|").join(bK+"|")+bK);var bN=new M("checked",function(c){if(typeof c.checked!=="boolean")return;var a=arguments;h.CSS.addEventHandler(c,"onpropertychange",function(){if(event.propertyName==="checked"){if(c.checked===true)bN.register(a);else bN.unregister(a)}});if(c.checked===true)bN.register(a)}),bO=new M("enabled",function(c){if(typeof c.disabled!=="boolean")return;var a=arguments;h.CSS.addEventHandler(c,"onpropertychange",function(){if(event.propertyName==="disabled"){if(c.disabled===false)bO.register(a);else bO.unregister(a)}});if(c.disabled===false)bO.register(a)}),bP=new M("disabled",function(c){if(typeof c.disabled!=="boolean")return;var a=arguments;h.CSS.addEventHandler(c,"onpropertychange",function(){if(event.propertyName==="disabled"){if(c.disabled===true)bP.register(a);else bP.unregister(a)}});if(c.disabled===true)bP.register(a)}),bQ=new M("indeterminate",function(c){if(typeof c.indeterminate!=="boolean")return;var a=arguments;h.CSS.addEventHandler(c,"onpropertychange",function(){if(event.propertyName==="indeterminate"){if(c.indeterminate===true)bQ.register(a);else bQ.unregister(a)}});h.CSS.addEventHandler(c,"onclick",function(){bQ.unregister(a)})}),bR=new M("target",function(c){var a=arguments;if(!c.tabIndex)c.tabIndex=0;h.CSS.addEventHandler(p,"onpropertychange",function(){if(event.propertyName==="activeElement"){if(c.id&&c.id===location.hash.slice(1))bR.register(a);else bR.unregister(a)}});if(c.id&&c.id===location.hash.slice(1))bR.register(a)}),ct=1,bu={_4:1};h._b=function(l,m,j){var i=l.parentNode;if(!i||i.nodeType!==1)return NaN;var g=j?l.nodeName:"";if(g==="TR"&&l.sectionRowIndex>=0){var c=l.sectionRowIndex;return m?l.parentNode.rows.length-c+1:c}if((g==="TD"||g==="TH")&&l.cellIndex>=0){c=l.cellIndex;return m?l.parentNode.cells.length-c+1:c}if(bu._4!==ct){bu={_4:ct}}var f=(i.uniqueID)+"-"+g,d=bu[f];if(!d){d={};var c=0,a=i.firstChild;while(a){if(j?a.nodeName===g:a.nodeName>"@"){d[a.uniqueID]=++c}a=a.nextSibling}d.length=c;bu[f]=d}c=d[l.uniqueID];return m?d.length-c+1:c};h._c=function(a){a=a.firstChild;while(a){if(a.nodeType===3||a.nodeName>"@")return false;a=a.nextSibling}return true};h._a=function(d,c){var a=d.nodeName;c+="Sibling";do{d=d[c];if(d&&d.nodeName===a)break}while(d);return d};var dl={"+":1,"-":-1},dm=/ /g;T=O(O({":nth(-last)?-(?:child|(of-type))\\((<#nth_arg>)\\)(<#filter>)?":function(m,j,i,g,f){g=g.replace(dm,"");var d="IE7._b(e,"+!!j+","+!!i+")";if(g==="even")g="2n";else if(g==="odd")g="2n+1";else if(!isNaN(g))g="0n"+~~g;g=g.split("n");var c=~~(dl[g[0]]||g[0]||1),b=~~g[1];if(c===0){var a=d+"==="+b}else{a="((ii="+d+")-("+b+"))%"+c+"===0&&ii"+(c<0?"<":">")+"="+b}return this.parse(f)+a+"&&"},"<#negation>":function(c,a){if(/:not/i.test(a))bv();if(/^[#.:\[]/.test(a)){a="*"+a}return"!("+D.parse(a).slice(3,-2)+")&&"}},T),{":checked":"e.checked===true&&",":disabled":"e.disabled===true&&",":enabled":"e.disabled===false&&",":last-child":"!"+bE+"&&",":only-child":"!"+ck+"&&!"+bE+"&&",":first-of-type":cs,":last-of-type":bM,":only-of-type":cs+bM,":empty":"IE7._c(e)&&",":root":"e==R&&",":target":"H&&"+cn+"===H&&"});var dn="article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(",");for(var cu=0,cv;cv=dn[cu];cu++)p.createElement(cv);U+="datalist{display:none}details{padding-left:40px;display:block;margin:1em 0}meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}progress{width:10em;}article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}figure{margin:1em 40px;display:block}mark{background:yellow}";h.CSS.addFix(/\bopacity\s*:\s*([\d.]+)/,function(c,a){return"zoom:1;filter:Alpha(opacity="+((a*100)||1)+")"});var D,J=(function(){var o0=/^[>+~]/,bw=false;function dp(f,d,c){f=bZ(f);if(!d)d=p;var a=d;bw=o0.test(f);if(bw){d=d.parentNode;f="*"+f}try{return n.create(f,bw)(d,c?null:[],a)}catch(ex){return c?null:[]}};var dq=/^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/,dE=/^(href|src)$/,cw={"class":"className","for":"htmlFor"},dF=/\sie7_\w+/g,dr=/^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;h._0=function(f,d){if(f.getAttributeNode){var c=f.getAttributeNode(d)}d=cw[d.toLowerCase()]||d;if(!c)c=f.attributes[d];var a=c&&c.specified;if(f[d]&&typeof f[d]=="boolean")return d.toLowerCase();if((a&&dr.test(d))||(!c&&E)||d==="value"||d==="type"){return f.getAttribute(d,2)}if(d==="style")return f.style.cssText.toLowerCase()||null;return a?String(c.nodeValue):null};var cx="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";O(cw,cO(cx.toLowerCase().split(","),cx.split(",")));h._1=function(c,a){a+="Sibling";do{c=c[a];if(c&&c.nodeName>"@")break}while(c);return c};var ds=/(^|[, >+~])([#.:\[])/g,dG=/\)\{/g,dt=/,/,dH=/^['"]/,du=/\\([\da-f]{2,2})/gi,dI=/last/i;h._d=function(f,d){var c=f.all[d]||null;if(!c||(c.nodeType&&h._0(c,"id")===d))return c;for(var a=0;a<c.length;a++){if(h._0(c[a],"id")===d)return c[a]}return null};var bb=G.extend({dictionary:new cM({ident:/\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/,combinator:/[\s>+~]/,operator:/[\^~|$*]?=/,nth_arg:/[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/,tag:/\*|<#ident>/,id:/#(<#ident>)/,'class':/\.(<#ident>)/,pseudo:/\:([\w-]+)(?:\(([^)]+)\))?/,attr:/\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/,negation:/:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/,sequence:/(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/,filter:/[#.:\[]<#sequence>/,selector:/[^>+~](\\.|[^,])*?/,grammar:/^(<#selector>)((,<#selector>)*)$/}),ignoreCase:true}),dv=new bb({"\\\\.|[~*]\\s+=|\\+\\s+\\d":G.IGNORE,"\\[\\s+":"[","\\(\\s+":"(","\\s+\\)":")","\\s+\\]":"]","\\s*([,>+~]|<#operator>)\\s*":"$1","\\s+$":"","\\s+":" "});function dw(a){a=dv.parse(a.replace(du,"\\x$1")).replace(bz,"$1").replace(ds,"$1*$2");if(!dq.test(a))bv();return a};function dJ(a){return a.replace(cb,dx)};function dx(c,a){return W[a]};var dy=/\{/g,dz=/\\{/g;function bS(a){return Array((a.replace(dz,"").match(dy)||"").length+1).join("}")};T=new bb(T);var v=/:target/i,Z=/:root/i;function S(c){var a="";if(Z.test(c))a+=",R=d.documentElement";if(v.test(c))a+=",H=d.location;H=H&&H.hash.replace('#','')";if(a||c.indexOf("#")!==-1){a=",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document"+a}return"var ii"+a+";"};var ba={" ":";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){",">":".parentElement;if(e){","+":";while((e=e.previousSibling)&&!("+cl+"))continue;if(e){","~":";while((e=e.previousSibling)){"+cm},K=/\be\b/g;D=new bb({"(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$":function(j,i,g,f,d){var c="";if(f!=="*"){var a=f.toUpperCase();c+="if(e.nodeName==='"+a+(a===f?"":"'||e.nodeName==='"+f)+"'){"}if(d){c+="if("+T.parse(d).slice(0,-2)+"){"}c=c.replace(K,"e"+this.index);if(g){c+="var e=e"+(this.index++)+ba[g];c=c.replace(K,"e"+this.index)}if(i){c+=this.parse(i)}return c}});var L="e0=IE7._d(d,'%1');if(e0){",z="var n=c.getElementsByTagName('%1');",w="if(r==null)return e0;r[k++]=e0;",r=1,A=new bb({"^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$":true}),s={},q=new bb({"^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$":function(j,i,g,f,d){var c=H(L,g),a="}";if(f){c+=D.parse(i+f);a=bS(c)}if(d){c+="s=c=e0;"+n.parse("*"+d)}else{c+=w}return c+a},"^([^#,]+)#(<#ident>)(<#filter>)?$":function(g,f,d,c){var a=H(L,d);if(f==="*"){a+=w}else{a+=D.parse(f+c)+w+"break"}return a+bS(a)},"^.*$":""}),n=new bb({"<#grammar>":function(k,l,m){if(!this.groups)this.groups=[];var j=A.exec(" "+l);if(!j)bv();this.groups.push(j.slice(1));if(m){return this.parse(m.replace(dt,""))}var i=this.groups,g=i[0][r];for(var c=1;j=i[c];c++){if(g!==j[r]){g="*";break}}var f="",d=w+"continue filtering;";for(var c=0;j=i[c];c++){D.index=0;if(g!=="*")j[r]="*";j=j.join("");if(j===" *"){f=d;break}else{j=D.parse(j);if(bw)j+="if(e"+D.index+"==s){";f+=j+d+bS(j)}}var a=g==="*";return(a?"var n=c.all;":H(z,g))+"filtering:while((e0=n[i++]))"+(a?cm.replace(K,"e0"):"{")+f+"}"},"^.*$":bv}),o=/\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g;n.create=function(d){if(!s[d]){d=dw(d);this.groups=null;D.index=0;var c=this.parse(d);this.groups=null;D.index=0;if(d.indexOf("#")!==-1){var a=q.parse(d);if(a){c="if(t===1||t===11|!c.getElementById){"+c+"}else{"+a+"}"}}c=c.replace(o,"$2");c=S(d)+bd(c);s[d]=new Function("return function(c,r,s){var i=0,k=0,e0;"+c+"return r}")()}return s[d]};return dp})();function bv(){throw new SyntaxError("Invalid selector.");};h.loaded=true;(function(){try{if(!p.body)throw"continue";bx.doScroll("left")}catch(ex){setTimeout(arguments.callee,1);return}try{eval(bU.innerHTML)}catch(ex){}if(typeof IE7_PNG_SUFFIX=="object"){bh=IE7_PNG_SUFFIX}else{bh=new RegExp(bY(N.IE7_PNG_SUFFIX||"-trans.png")+"(\\?.*)?$","i")}B=p.body;x=E?B:bx;B.className+=" ie7_body";bx.className+=" ie7_html";if(E)dc();h.CSS.init();h.HTML.init();h.HTML.apply();h.CSS.apply();h.recalc()})()})(this,document);
diff --git a/src/ie7/LICENSE b/src/ie7/LICENSE
new file mode 100644 (file)
index 0000000..4cbba59
--- /dev/null
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2004-2010 Dean Edwards
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/src/ie7/blank.gif b/src/ie7/blank.gif
new file mode 100644 (file)
index 0000000..a4fe2e6
Binary files /dev/null and b/src/ie7/blank.gif differ
index 5b8de6b..7f9a31d 100644 (file)
@@ -8,17 +8,13 @@ if ($admin && isset($_POST['submit_repo'])) {
   if ($res === false) {
     $errorMsg = "Le dépôt n'a pas pu être ajouté.";
   }
+  if (isset($_POST['new-export']) && $_POST['new-export'] == 'on') {
+    gitrepoinfo('export', $fRepo, 'on');
+  }
 }
+$pageTitle = $title;
+require('header.inc.php');
 ?>
-<html>
-  <head>
-    <title><?php echo $title; ?></title>
-    <link href="style.css" rel="stylesheet" type="text/css" />
-    <link rel="shortcut icon" href="favicon.png" type="image/png"/>
-  </head>
-  <body>
-    <h1><?php echo $title; ?></h1>
-<?php require('nav.inc.php'); ?>
     <div id="repos">
       <div class="invite">Les dépôts Git :</div>
       <table>
@@ -35,8 +31,8 @@ foreach ($files as $file) {
   if (is_dir("$gitdir/$file") && preg_match('/\.git$/', $file)) {
     $proj = preg_replace('/\.git$/', '', $file);
     $desc = htmlspecialchars(file_get_contents("$gitdir/$file/description"));
-    if (preg_match('/^Unnamed repository;/', $desc)) {
-      $desc = "$proj";
+    if (empty($desc) || preg_match('/^Unnamed repository;/', $desc)) {
+      $desc = $proj;
     }
     $users = gitrepoinfo('show-users', $proj);
     $membre = count($users) > 0 ? '<span title="Veuillez vous identifier"> ? </span>' : '<span title="Aucun utilisateur"> — </span>';
@@ -48,14 +44,16 @@ foreach ($files as $file) {
       }
     }
     $actions = "<a href=\"repo-users.php?repo=$proj\">Utilisateurs</a>&nbsp;<a href=\"repo-histo.php?repo=$proj\">Historique</a>";
+    if ($admin) {
+      $actions .= "&nbsp;<a class=\"edit\" href=\"repo-edit.php?repo=$proj\">Éditer</a>";
+      $actions .= "&nbsp;<a class=\"delete\" href=\"repo-del.php?repo=$proj\" onclick=\"return confirm('Êtes vous sûr de vouloir supprimer le dépôt \'$proj\' ?');\">Supprimer</a>";
+    }
+    $name = $proj;
     $exportok = file_exists("$gitdir/$file/git-daemon-export-ok");
     if (!empty($gitwebpath) && $exportok) {
-      $actions .= "&nbsp;<a href=\"$gitwebpath/?p=$file\">Explorer</a>";
-    }
-    if ($admin) {
-      $actions .= "&nbsp;<a href=\"repo-del.php?repo=$proj\">Supprimer</a>";
+      $name .= "&nbsp;<a href=\"$gitwebpath/?p=$file\">⇒</a>";
     }
-    echo "        <tr><td class=\"name\" title=\"$desc\">$proj</td><td class=\"address\">";
+    echo "        <tr><td class=\"name\" title=\"$desc\">$name</td><td class=\"address\">";
     echo "<div class=\"rw\">$gituser@$githost:$gitdir/$file</div>";
     if ($exportok) {
       echo "<div class=\"ro\">git://$githost/$file</div>";
@@ -67,18 +65,26 @@ foreach ($files as $file) {
       </table>
     </div>
 <?php if ($admin) { ?>
-    <hr/>
     <div class="error"><?php echo $errorMsg; ?></div>
     <form id="repo-add" action="" method="POST">
       <fieldset>
         <legend>Ajouter un dépôt</legend>
-        <label for="new-repo">Nom du nouveau dépôt :</label>&nbsp;<input type="text" name="new-repo" id="new-repo" value=""/><br/>
-        <label for="new-desc">Description :</label>&nbsp;<input type="text" name="new-desc" id="new-desc" value=""/><br/>
-        <input type="submit" name="submit_repo" value="Ajouter le dépôt"/>
+        <table>
+          <tr>
+            <td>
+              <label for="new-repo">Nom du nouveau dépôt :</label>&nbsp;<input type="text" name="new-repo" id="new-repo" value=""/>
+              <br/><label for="new-desc">Description :</label>&nbsp;<input type="text" name="new-desc" id="new-desc" value=""/>
+              <?php if (!empty($gitwebpath)) { ?>
+              <br/><label for="new-export">Anonymous read-only access :</label>&nbsp;<input type="checkbox" name="new-export" id="new-export" value="on"/>
+              <?php } ?>
+            </td>
+            <td>
+              <input type="submit" name="submit_repo" value="Ajouter le dépôt"/>
+            </td>
+          </tr>
+        </table>
       </fieldset>
     </form>
-    <hr/>
     <a href="admin-users.php">Gestion des utilisateurs</a>
 <?php } ?>
-  </body>
-</html>
+<?php require('footer.inc.php'); ?>
index e2ccec5..376c47b 100644 (file)
@@ -1,4 +1,5 @@
 <div id="nav">
+  <p class="breadcrumbs"><a href="index.php">Index</a></p>
 <?php
 if ($logged) {
   echo "<p>Vous êtes connecté en tant que <span>" . $_SESSION['username'] . "</span><br/>\n";
index 867b5ee..44dfddd 100644 (file)
@@ -6,5 +6,9 @@ if (isset($_POST['payload'])) {
   $repoName = $info['repository']['name'];
   $repoUrl = $info['repository']['url'];
   gitrepoinfo('fetch', $repoName, $repoUrl);
+} else if (isset($_GET['name']) && isset($_GET['url'])) {
+  $repoName = $_GET['name'];
+  $repoUrl = $_GET['url'];
+  gitrepoinfo('fetch', $repoName, $repoUrl);
 }
 ?>
diff --git a/src/repo-edit.php b/src/repo-edit.php
new file mode 100644 (file)
index 0000000..b8f8116
--- /dev/null
@@ -0,0 +1,155 @@
+<?php
+require('include.inc.php');
+if (!$admin) {
+  header('Location: index.php');
+  exit;
+}
+if (empty($_GET['repo'])) {
+  header('Location: index.php');
+  exit;
+} else {
+  $repo = $_GET['repo'];
+}
+$errorMsgDesc = '';
+$errorMsgConfig = '';
+$errorMsgExport = '';
+$errorMsgSyncTo = '';
+$errorMsgSyncFrom = '';
+if (isset($_POST['submit_repo_desc'])) {
+  $fDesc = $_POST['new-desc'];
+  $res = gitrepoinfo('set', $repo, 'description', $fDesc);
+  if ($res === false) {
+    $errorMsgDesc = "La description n'a pas pu être appliquée.";
+  }
+} else if (isset($_POST['submit_repo_config'])) {
+  $fOption = $_POST['new-option'];
+  $fValue = $_POST['new-value'];
+  $res = gitrepoinfo('set', $repo, $fOption, $fValue);
+  if ($res === false) {
+    $errorMsgConfig = "L'option n'a pas pu être appliquée.";
+  }
+} else if (isset($_POST['submit_repo_export'])) {
+  $fExport = $_POST['new-export'] == 'on' ? 'on' : 'off';
+  $res = gitrepoinfo('export', $repo, $fExport);
+  if ($res === false) {
+    $errorMsgExport = "L'export n'a pas pu être appliqué.";
+  }
+} else if (isset($_POST['submit_repo_syncto_add'])) {
+  $fUrl = $_POST['new-syncto-url'];
+  $res = gitrepoinfo('sync', $repo, 'to', $fUrl);
+  if ($res === false) {
+    $errorMsgSyncTo = "L'url n'a pas pu être ajoutée.";
+  }
+} else if (isset($_GET['delete']) && $_GET['delete'] == 'syncto') {
+  $fUrl = $_GET['url'];
+  $res = gitrepoinfo('unsync', $repo, 'to', $fUrl);
+  header("Location: repo-edit.php?repo=$repo");
+} else if (isset($_POST['submit_repo_syncfrom_add'])) {
+  $fUrl = $_POST['new-syncfrom-url'];
+  $res = gitrepoinfo('sync', $repo, 'from', $fUrl);
+  if ($res === false) {
+    $errorMsgSyncFrom = "L'url n'a pas pu être ajoutée.";
+  }
+} else if (isset($_GET['delete']) && $_GET['delete'] == 'syncfrom') {
+  $fUrl = $_GET['url'];
+  $res = gitrepoinfo('unsync', $repo, 'from', $fUrl);
+  header("Location: repo-edit.php?repo=$repo");
+}
+$pageTitle = "$title - Configuration de $repo";
+require('header.inc.php');
+?>
+    <div id="desc">
+      <div class="error"><?php echo $errorMsgDesc; ?></div>
+      <form id="repo-edit-desc" action="" method="POST">
+        <fieldset>
+          <legend>Description</legend>
+          <label for="new-desc">Description :</label>&nbsp;<input type="text" name="new-desc" id="new-desc" value="<?php echo htmlspecialchars(file_get_contents("$gitdir/$repo.git/description")); ?>"/>
+          <input type="submit" name="submit_repo_desc" value="Mettre à jour la description"/>
+        </fieldset>
+      </form>
+    </div>
+    <div id="config">
+      <div class="invite">Configuration de <span><?php echo $repo; ?></span> :</div>
+      <pre>
+<?php
+  $cfg = file_get_contents("$gitdir/$repo.git/config");
+  echo preg_replace('/[ \t][ \t]*/', '  ', $cfg);
+?>
+      </pre>
+      <div class="error"><?php echo $errorMsgConfig; ?></div>
+      <form id="repo-edit-config" action="" method="POST">
+        <fieldset>
+          <legend>Changer/Ajouter une option de config</legend>
+          <label for="new-option">Config option :</label>&nbsp;<input type="text" name="new-option" id="new-option" value=""/>
+          <label for="new-value">Config value :</label>&nbsp;<input type="text" name="new-value" id="new-value" value=""/>
+          <input type="submit" name="submit_repo_config" value="Mettre à jour l'option de configuration"/>
+        </fieldset>
+      </form>
+    </div>
+    <?php if (!empty($gitwebpath)) { ?>
+    <?php $isExport = file_exists("$gitdir/$repo.git/git-daemon-export-ok") ? 'checked="checked"' : ''; ?>
+    <div id="export">
+      <div class="error"><?php echo $errorMsgExport; ?></div>
+      <form id="repo-edit-export" action="" method="POST">
+        <fieldset>
+          <legend>Gitweb</legend>
+          <label for="new-export">Anonymous read-only access :</label>&nbsp;<input type="checkbox" name="new-export" id="new-export" value="on" <?php echo $isExport; ?>/>
+          <input type="submit" name="submit_repo_export" value="Mettre à jour l'option d'export lecture-seule"/>
+        </fieldset>
+      </form>
+    </div>
+    <?php } ?>
+    <div id="syncto">
+      <div class="error"><?php echo $errorMsgSyncTo; ?></div>
+      <div class="invite">This repo is synchronized to :</div>
+      <table>
+        <tr>
+          <th class="name">Url</th>
+          <th class="actions">Actions</th>
+        </tr>
+<?php
+  $urls = gitrepoinfo('listsync', $repo, 'to');
+  foreach ($urls as $url) {
+    echo "        <tr>\n";
+    echo "          <td class=\"name\">$url</td>\n";
+    echo "          <td class=\"actions\"><a class=\"delete\" href=\"?repo=$repo&delete=syncto&url=$url\" onclick=\"return confirm('Êtes vous sûr de vouloir supprimer cette url ?');\">Supprimer</a></td>\n";
+    echo "        </tr>\n";
+  }
+?>
+      </table>
+      <form id="repo-syncto-add" action="" method="POST">
+        <fieldset>
+          <legend>Ajouter une URL vers laquelle se synchroniser</legend>
+          <label for="new-syncto-url">URL :</label>&nbsp;<input type="text" name="new-syncto-url" id="new-syncto-url" value=""/>
+          <input type="submit" name="submit_repo_syncto_add" value="Ajouter l'URL"/>
+        </fieldset>
+      </form>
+    </div>
+    <div id="syncfrom">
+      <div class="error"><?php echo $errorMsgSyncFrom; ?></div>
+      <div class="invite">This repo is synchronized from :</div>
+      <table>
+        <tr>
+          <th class="name">Url</th>
+          <th class="actions">Actions</th>
+        </tr>
+<?php
+  $urls = gitrepoinfo('listsync', $repo, 'from');
+  foreach ($urls as $url) {
+    echo "        <tr>\n";
+    echo "          <td class=\"name\">$url</td>\n";
+    echo "          <td class=\"actions\"><a class=\"delete\" href=\"?repo=$repo&delete=syncfrom&url=$url\" onclick=\"return confirm('Êtes vous sûr de vouloir supprimer cette url ?');\">Supprimer</a></td>\n";
+    echo "        </tr>\n";
+  }
+?>
+      </table>
+      <p>Url to trigger synchronization: <a class="text" href="post-update.php">post-update.php</a></p>
+      <form id="repo-syncfrom-add" action="" method="POST">
+        <fieldset>
+          <legend>Ajouter une URL depuis laquelle se synchroniser</legend>
+          <label for="new-syncfrom-url">URL :</label>&nbsp;<input type="text" name="new-syncfrom-url" id="new-syncfrom-url" value=""/>
+          <input type="submit" name="submit_repo_syncfrom_add" value="Ajouter l'URL"/>
+        </fieldset>
+      </form>
+    </div>
+<?php require('footer.inc.php'); ?>
index 5885124..1fcc8d0 100644 (file)
@@ -6,16 +6,9 @@ if (empty($_GET['repo'])) {
 } else {
   $repo = $_GET['repo'];
 }
+$pageTitle = "$title - $repo";
+require('header.inc.php');
 ?>
-<html>
-  <head>
-    <title><?php echo "$title - $repo"; ?></title>
-    <link href="style.css" rel="stylesheet" type="text/css" />
-    <link rel="shortcut icon" href="favicon.png" type="image/png"/>
-  </head>
-  <body>
-    <h1><?php echo "$title - $repo"; ?></h1>
-    <div id="nav"><a href="index.php">Index</a></div>
     <div id="users">
       <div class="invite">Le graphe d'historique de <span><?php echo $repo; ?></span> :</div>
       <pre>
@@ -29,5 +22,4 @@ if (empty($_GET['repo'])) {
 ?>
       </pre>
     </div>
-  </body>
-</html>
+<?php require('footer.inc.php'); ?>
index e81b9b1..f9e2b5b 100644 (file)
@@ -14,16 +14,9 @@ if ($admin && isset($_POST['submit_user_add'])) {
     $errorMsg = "L'utilisateur n'a pas pu être ajouté.";
   }
 }
+$pageTitle = "$title - Membres de $repo";
+require('header.inc.php');
 ?>
-<html>
-  <head>
-    <title><?php echo "$title - $repo"; ?></title>
-    <link href="style.css" rel="stylesheet" type="text/css" />
-    <link rel="shortcut icon" href="favicon.png" type="image/png"/>
-  </head>
-  <body>
-    <h1><?php echo "$title - $repo"; ?></h1>
-    <div id="nav"><a href="index.php">Index</a></div>
     <div id="users">
       <div class="invite">Les membres de <span><?php echo $repo; ?></span> :</div>
       <table>
@@ -44,12 +37,11 @@ foreach ($users as $user) {
       </table>
     </div>
 <?php if ($admin) { ?>
-    <hr/>
     <div class="error"><?php echo $errorMsg; ?></div>
     <form id="repo-add-user" action="" method="POST">
       <fieldset>
         <legend>Ajouter un utilisateur au dépôt</legend>
-        <label for="new-repo">Nouveau membre :</label>&nbsp;
+        <label for="username">Nouveau membre :</label>&nbsp;
         <select name="username">
 <?php
 $users = gitrepoinfo('list-users');
@@ -63,5 +55,4 @@ foreach ($users as $user) {
       </fieldset>
     </form>
 <?php } ?>
-  </body>
-</html>
+<?php require('footer.inc.php'); ?>
index 6e9c15c..e916352 100644 (file)
@@ -1,13 +1,21 @@
-a, a:link, a:visited {
+a, a:link, a:visited, button, input[type="submit"] {
   display: inline-block;
   text-decoration: none;
-  appearance: button;
-  -moz-appearance: button;
-  -webkit-appearance: button;
-  -o-appearance: button;
   font: menu;
   color: ButtonText;
   padding: 2px 8px;
+  background-color: #EED;
+  border: 1px outset ButtonText;
+}
+a.delete {
+  color: red;
+}
+a.text {
+  color: navy;
+  font-weight: bold;
+  text-decoration: underline;
+  background-color: transparent;
+  border: none;
 }
 h1 {
   text-align: center;
@@ -16,12 +24,16 @@ textarea {
   width: 800px;
   height: 100px;
 }
+td.key textarea {
+  width: 100%;
+}
 table {
   border: 1px solid black;
   border-collapse: collapse;
   width: 100%;
 }
 table .name,
+table .keyname,
 table .key,
 table .address {
   text-align: left;
@@ -30,6 +42,9 @@ table .member,
 table .actions {
   text-align: center;
 }
+table .keyname {
+  max-width: 50px;
+}
 table th {
   background-color: #EEE;
   text-align: center !important;
@@ -40,10 +55,14 @@ table tr:hover {
 }
 #nav {
   padding: 5px 0 5px 20px;
+  border-bottom: 1px solid gray;
 }
 #nav p span {
   font-weight: bold;
 }
+#nav p.breadcrumbs:before {
+  content: "» ";
+}
 div.invite {
   margin-top: 10px;
   margin-left: 20px;
@@ -69,3 +88,6 @@ div.ro {
 div.ro:after {
   content: " (readonly)";
 }
+#new-desc {
+  min-width: 400px;
+}