From: vincent@cubedesigners.com Date: Fri, 21 Oct 2011 12:43:50 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=162cddb34b693a1d0878dbedb823e7afb1d33ba1;p=cubeextranet.git --- diff --git a/fluidbook/icones/4/nav-2d.png b/fluidbook/icones/4/nav-2d.png new file mode 100644 index 000000000..a8ba6d73b Binary files /dev/null and b/fluidbook/icones/4/nav-2d.png differ diff --git a/fluidbook/icones/4/nav-3d.png b/fluidbook/icones/4/nav-3d.png new file mode 100644 index 000000000..032e2da30 Binary files /dev/null and b/fluidbook/icones/4/nav-3d.png differ diff --git a/fluidbook/icones/4/nav-archives.png b/fluidbook/icones/4/nav-archives.png new file mode 100644 index 000000000..a7d293a59 Binary files /dev/null and b/fluidbook/icones/4/nav-archives.png differ diff --git a/fluidbook/icones/4/nav-basket.png b/fluidbook/icones/4/nav-basket.png new file mode 100644 index 000000000..d4c4baa9d Binary files /dev/null and b/fluidbook/icones/4/nav-basket.png differ diff --git a/fluidbook/icones/4/nav-bookmark.png b/fluidbook/icones/4/nav-bookmark.png new file mode 100644 index 000000000..111b08bfb Binary files /dev/null and b/fluidbook/icones/4/nav-bookmark.png differ diff --git a/fluidbook/icones/4/nav-friend.png b/fluidbook/icones/4/nav-friend.png new file mode 100644 index 000000000..23885ce68 Binary files /dev/null and b/fluidbook/icones/4/nav-friend.png differ diff --git a/fluidbook/icones/4/nav-fullscreen.png b/fluidbook/icones/4/nav-fullscreen.png new file mode 100644 index 000000000..9b80abeec Binary files /dev/null and b/fluidbook/icones/4/nav-fullscreen.png differ diff --git a/fluidbook/icones/4/nav-help.png b/fluidbook/icones/4/nav-help.png new file mode 100644 index 000000000..a45edc9f5 Binary files /dev/null and b/fluidbook/icones/4/nav-help.png differ diff --git a/fluidbook/icones/4/nav-index.png b/fluidbook/icones/4/nav-index.png new file mode 100644 index 000000000..37507d91b Binary files /dev/null and b/fluidbook/icones/4/nav-index.png differ diff --git a/fluidbook/icones/4/nav-normal.png b/fluidbook/icones/4/nav-normal.png new file mode 100644 index 000000000..03fe202aa Binary files /dev/null and b/fluidbook/icones/4/nav-normal.png differ diff --git a/fluidbook/icones/4/nav-normalscreen.png b/fluidbook/icones/4/nav-normalscreen.png new file mode 100644 index 000000000..0206770a9 Binary files /dev/null and b/fluidbook/icones/4/nav-normalscreen.png differ diff --git a/fluidbook/icones/4/nav-print.png b/fluidbook/icones/4/nav-print.png new file mode 100644 index 000000000..215e57a82 Binary files /dev/null and b/fluidbook/icones/4/nav-print.png differ diff --git a/fluidbook/icones/4/nav-save.png b/fluidbook/icones/4/nav-save.png new file mode 100644 index 000000000..40f87f69f Binary files /dev/null and b/fluidbook/icones/4/nav-save.png differ diff --git a/fluidbook/icones/4/nav-sommaire.png b/fluidbook/icones/4/nav-sommaire.png new file mode 100644 index 000000000..ecd58a9fc Binary files /dev/null and b/fluidbook/icones/4/nav-sommaire.png differ diff --git a/fluidbook/icones/4/nav-soundoff.png b/fluidbook/icones/4/nav-soundoff.png new file mode 100644 index 000000000..67a76fde6 Binary files /dev/null and b/fluidbook/icones/4/nav-soundoff.png differ diff --git a/fluidbook/icones/4/nav-soundon.png b/fluidbook/icones/4/nav-soundon.png new file mode 100644 index 000000000..47bc01982 Binary files /dev/null and b/fluidbook/icones/4/nav-soundon.png differ diff --git a/fluidbook/icones/4/nav-zoomin.png b/fluidbook/icones/4/nav-zoomin.png new file mode 100644 index 000000000..c2effa4b0 Binary files /dev/null and b/fluidbook/icones/4/nav-zoomin.png differ diff --git a/fluidbook/icones/4/nav-zoomout.png b/fluidbook/icones/4/nav-zoomout.png new file mode 100644 index 000000000..bc05b8afa Binary files /dev/null and b/fluidbook/icones/4/nav-zoomout.png differ diff --git a/inc/commons/class.common.core.php b/inc/commons/class.common.core.php index 1c0ebe9c8..d9bc11340 100644 --- a/inc/commons/class.common.core.php +++ b/inc/commons/class.common.core.php @@ -333,22 +333,17 @@ class commonCore extends cubeCore { // . // Table pages des documents $db->document_links->document_id('integer', 0, false); - $db->document_links->document_page('integer', 0, false); $db->document_links->links('text', 0, false); - $db->document_links->nb_links('integer', 0, false); $db->document_links->rulers('text', 0, false); - $db->document_links->nb_rulers('integer', 0, false); - $db->document_links->update('integer', 0, false); // Clés - $db->document_links->primary('pk_document_links', 'document_id', 'document_page', 'update'); - $db->document_links->index('index_document_links_date', 'BTREE', 'update'); - $db->document_links->index('index_document_links_document_id', 'BTREE', 'document_id'); + $db->document_links->primary('pk_document_links', 'document_id'); + // . // Tables versions des liens $db->document_links_versions->document_id('integer', 0, false); $db->document_links_versions->links('text', 0, false); $db->document_links_versions->rulers('text', 0, false); - $db->document_links_versions->comments('varchar', 64, false); + $db->document_links_versions->comments('varchar', 128, false); $db->document_links_versions->user('integer', 0, false); $db->document_links_versions->update('integer', 0, false); // . diff --git a/inc/extranet/_common.php b/inc/extranet/_common.php index 5eb1cbfeb..2bbaa6729 100644 --- a/inc/extranet/_common.php +++ b/inc/extranet/_common.php @@ -6,6 +6,6 @@ require_once(dirname(__FILE__) . '/DAO/_common.php'); $GLOBALS['ajaxClasses'][] = 'extranetAjax'; -$core->url->register('cleanDownload', 'cleanDownload', '^cleanDownload$', array('extranetUrl', 'cleanDownload')); + ?> \ No newline at end of file diff --git a/inc/extranet/prepend.php b/inc/extranet/prepend.php new file mode 100644 index 000000000..2f04b3dd5 --- /dev/null +++ b/inc/extranet/prepend.php @@ -0,0 +1,4 @@ +url->register('cleanDownload', 'cleanDownload', '^cleanDownload$', array('extranetUrl', 'cleanDownload')); +?> diff --git a/inc/prepend.php b/inc/prepend.php index a2b544c6c..ffbd910d6 100644 --- a/inc/prepend.php +++ b/inc/prepend.php @@ -37,6 +37,7 @@ if ($ws) { $GLOBALS['ajaxClasses'][] = 'commonAjax'; require_once(dirname(__FILE__) . '/' . MODE . '/_common.php'); +require_once(dirname(__FILE__) . '/' . MODE . '/prepend.php'); if (isset($_POST['q'])) { $_SESSION['q'] = $_POST['q']?$_POST['q']:null; diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index d12254a27..650239b3d 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -438,6 +438,9 @@ class wsFlash extends cubeFlashGateway { public function getLinks() { global $core; + + set_time_limit(0); + $dao = new wsDAOBook($core->con); $book = $dao->selectById($this->args['book_id']); diff --git a/inc/ws/DAO/class.ws.dao.document.php b/inc/ws/DAO/class.ws.dao.document.php index f894effe9..2fd63fc6e 100644 --- a/inc/ws/DAO/class.ws.dao.document.php +++ b/inc/ws/DAO/class.ws.dao.document.php @@ -43,8 +43,11 @@ class wsDAODocument extends commonDAO { $docs[] = $infos['document_id']; } - $sql = 'INSERT INTO document_links_versions (document_id,links,rulers,`update`,comments,user) SELECT document_id,links,rulers,' . TIME . ',\'Links from a previous version\',' . $user . ' FROM document_links_versions WHERE `update`=' . $update . ' AND document_id IN (' . implode(',', $docs) . ')'; - $this->con->execute($sql); + $r = $this->con->select('SELECT document_id,links,rulers FROM document_links_versions WHERE `update`=' . $update . ' AND document_id IN (' . implode(',', $docs) . ')'); + + while ($r->fetch()) { + wsLinks::setDocumentLinks($r->document_id, $r->links, $r->rulers, $user, 'Links restored from ' . date('Y-m-d H:i:s', $update) . ' version', TIME); + } } public function putLinksFromCSV($document_id) { @@ -55,10 +58,6 @@ class wsDAODocument extends commonDAO { $links = array(); - $c = $this->con->openCursor('document_links_versions'); - $c->document_id = $document->document_id; - $c->update = TIME; - for ($page = 1; $page <= $document->generalInfos['pages']; $page++) { $links[$page] = array(); @@ -105,10 +104,7 @@ class wsDAODocument extends commonDAO { $log[] = 'Added ' . count($links) . ' links'; } - $c->links = json_encode($links); - $c->comments = 'Links imported from PDF'; - $c->rulers = json_encode(array()); - $c->insert(); + wsLinks::setDocumentLinks($document_id, json_encode($links), json_encode(array()), 0, 'Links imported from PDF', TIME); return implode("\n", $log); } @@ -139,7 +135,7 @@ class wsDAODocument extends commonDAO { $rulers = array(); foreach ($t as $page => $tt) { - if(!is_int($page)){ + if (!is_int($page)) { continue; } $infos = $pages[$page]; @@ -164,16 +160,8 @@ class wsDAODocument extends commonDAO { } } - $c = $this->con->openCursor('document_links_versions'); - $c->update = TIME; - foreach ($links as $document_id => $dummy) { - $c->document_id = $document_id; - $c->links = json_encode($links[$document_id]); - $c->rulers = json_encode($rulers[$document_id]); - $c->comments = $comments; - $c->user = $user; - $c->insert(); + wsLinks::setDocumentLinks($document_id, json_encode($links[$document_id]), json_encode($rulers[$document_id]), $user, $comments, TIME); } $c = $this->con->openCursor('books'); @@ -265,17 +253,10 @@ class wsDAODocument extends commonDAO { } } - $c = $this->con->openCursor('document_links_versions'); - $c->update = TIME; - krsort($links); - foreach ($links as $document_id => $l) { - $c->document_id = $document_id; - $c->links = json_encode($l); - $c->rulers = json_encode(array()); - $c->insert(); - } + + wsLinks::setDocumentLinks($document_id, json_encode($l), json_encode(array()), 0, 'Import from Fluidbook V1', TIME); $c = $this->con->openCursor('books'); $c->changedate = TIME; @@ -283,66 +264,7 @@ class wsDAODocument extends commonDAO { } public function getLinksAndRulers($book_id, &$links, &$rulers, $time=null) { - - if (is_null($time)) { - $timeQuery = 'ORDER BY `update` DESC LIMIT 1'; - } else { - $timeQuery = 'AND `update`=' . $time; - } - - $daoBook = new wsDAOBook($this->con); - $pages = $daoBook->getPagesOfBookAt($book_id, $time); - - foreach ($pages as $p => $infos) { - $documents[] = $infos['document_id']; - } - $documents = array_unique($documents); - - $tlinks = array(); - $trulers = array(); - - $links = array(); - $rulers = array(); - - foreach ($documents as $d) { - $r = $this->con->select('SELECT * FROM document_links_versions WHERE document_id=' . $d . ' ' . $timeQuery); - - if (mb_substr($r->links, 1, 1) == ':') { - $ll = unserialize($r->links); - $rr = unserialize($r->rulers); - } else { - $ll = json_decode($r->links, true); - $rr = json_decode($r->rulers, true); - } - $tlinks[$d] = $ll; - $trulers[$d] = $rr; - } - - $i = 1; - foreach ($pages as $p => $infos) { - if (isset($tlinks[$infos['document_id']][$infos['document_page']])) { - $l = $tlinks[$infos['document_id']][$infos['document_page']]; - foreach ($l as $link) { - $link = (array) $link; - $link['page'] = $p; - $link['id'] = $i; - $links[] = $link; - } - } - if (isset($trulers[$infos['document_id']][$infos['document_page']])) { - $ru = $trulers[$infos['document_id']][$infos['document_page']]; - foreach ($ru as $ruler) { - $ruler['page'] = $p; - $rulers[] = $ruler; - } - } - } - - $daoBook = new wsDAOBook($this->con); - $book = $daoBook->selectById($book_id); - - $rulers = array_merge($rulers, $book->specialRulers); - $links = array_merge($links, $book->specialLinks); + return wsLinks::getLinksAndRulers($book_id, $links, $rulers, $time); } public function getLinksVersions($book_id) { @@ -466,94 +388,7 @@ class wsDAODocument extends commonDAO { } public function getLinksAsExcel($links, $rulers) { - $cols = array('document_id' => __('Document'), 'document_page' => __('Page du document'), - 'page' => __('Page de la publication'), 'left' => __('x'), 'top' => __('y'), 'width' => __('Largeur'), 'height' => __('Hauteur'), - 'type' => __('Type'), 'to' => __('Destination'), 'target' => __('Cible'), - 'infobulle' => __('Infobulle'), 'numerotation' => __('Numérotation'), - 'display_area' => __('Activer la surbrillance'), - 'video_loop' => __('Video : boucle'), 'video_auto_start' => __('Video : démarrage automatique'), 'video_controls' => __('Vidéo : afficher les contrôles'), 'video_sound_on' => __('Vidéo : activer le son'), - 'inline' => __('Vidéo : afficher dans la page'), 'video_width' => __('Vidéo : Largeur du popup'), 'video_height' => __('Vidéo : Hauteur du popup'), - 'interactive' => __('Interactivité'), 'video_service' => __('Webvideo : service'), - 'display_area' => __('Afficher le lien au rollover'), - 'extra' => __('Paramètre supplémentaire') - ); - - $xls = new PHPExcel(); - $s = $xls->setActiveSheetIndex(0); - $s->setTitle('Links'); - - // Labels - $i = 0; - foreach ($cols as $id => $label) { - $s->setCellValueByColumnAndRow($i, 1, $id); - $s->getColumnDimensionByColumn($i)->setAutoSize(true); - $s->getStyleByColumnAndRow($i, 1)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); - $i++; - } - // Links - $j = 2; - foreach ($links as $l) { - $i = 0; - foreach ($cols as $id => $label) { - if ($id == 'document_id' || $id == 'document_page') { - $infos = $pages[$l['page']]; - $value = $infos[$id]; - } else { - if (is_bool($l[$id])) { - $l[$id] = $l[$id] ? 1 : 0; - } - if ($id == 'numerotation') { - if ($l[$id] == 'false') { - $l[$id] = 'physical'; - } - } else if ($id == 'display_area') { - if ($l[$id] == '') { - $l[$id] = '1'; - } - } - $value = $l[$id]; - } - - $s->setCellValueByColumnAndRow($i, $j, $value); - $s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT); - $i++; - } - $j++; - } - // Rulers - $s = $xls->createSheet(); - $s->setTitle('Rulers'); - - $rcols = array('document_id', 'document_page', 'page', 'type', 'pos'); - $i = 0; - // Labels - foreach ($rcols as $id) { - $s->setCellValueByColumnAndRow($i, 1, $id); - $s->getColumnDimensionByColumn($i)->setAutoSize(true); - $s->getStyleByColumnAndRow($i, 1)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); - $i++; - } - - // Contents - $j = 2; - foreach ($rulers as $r) { - $i = 0; - foreach ($rcols as $id) { - if ($id == 'document_id' || $id == 'document_page') { - $infos = $pages[$r['page']]; - $value = $infos[$id]; - } else { - $value = $r[$id]; - } - $s->setCellValueByColumnAndRow($i, $j, $value); - $s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT); - $i++; - } - $j++; - } - - $xls->setActiveSheetIndex(0); - return $xls; + return wsLinks::linksToExcel($links, $rulers); } } diff --git a/inc/ws/Util/_common.php b/inc/ws/Util/_common.php index 0b86df328..45a1b6dd8 100644 --- a/inc/ws/Util/_common.php +++ b/inc/ws/Util/_common.php @@ -14,4 +14,5 @@ $__autoload['wsHTML5Link'] = dirname(__FILE__) . '/html5/class.ws.html5.links.ph $__autoload['wsPDFFontExtractor'] = dirname(__FILE__) . '/fontextractor/class.ws.pdf.fontextractor.php'; $__autoload['wsPDFFont'] = dirname(__FILE__) . '/fontextractor/class.ws.pdf.font.php'; $__autoload['wsSVN'] = dirname(__FILE__) . '/class.ws.svn.php'; +$__autoload['wsLinks'] = dirname(__FILE__) . '/class.ws.links.php'; ?> \ No newline at end of file diff --git a/inc/ws/Util/class.ws.links.php b/inc/ws/Util/class.ws.links.php new file mode 100644 index 000000000..a257aa9bc --- /dev/null +++ b/inc/ws/Util/class.ws.links.php @@ -0,0 +1,185 @@ + __('Document'), 'document_page' => __('Page du document'), + 'page' => __('Page de la publication'), 'left' => __('x'), 'top' => __('y'), 'width' => __('Largeur'), 'height' => __('Hauteur'), + 'type' => __('Type'), 'to' => __('Destination'), 'target' => __('Cible'), + 'infobulle' => __('Infobulle'), 'numerotation' => __('Numérotation'), + 'display_area' => __('Activer la surbrillance'), + 'video_loop' => __('Video : boucle'), 'video_auto_start' => __('Video : démarrage automatique'), 'video_controls' => __('Vidéo : afficher les contrôles'), 'video_sound_on' => __('Vidéo : activer le son'), + 'inline' => __('Vidéo : afficher dans la page'), 'video_width' => __('Vidéo : Largeur du popup'), 'video_height' => __('Vidéo : Hauteur du popup'), + 'interactive' => __('Interactivité'), 'video_service' => __('Webvideo : service'), + 'display_area' => __('Afficher le lien au rollover'), + 'extra' => __('Paramètre supplémentaire') + ); + + $xls = new PHPExcel(); + $s = $xls->setActiveSheetIndex(0); + $s->setTitle('Links'); + + // Labels + $i = 0; + foreach ($cols as $id => $label) { + $s->setCellValueByColumnAndRow($i, 1, $id); + $s->getColumnDimensionByColumn($i)->setAutoSize(true); + $s->getStyleByColumnAndRow($i, 1)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); + $i++; + } + // Links + $j = 2; + foreach ($links as $l) { + $i = 0; + foreach ($cols as $id => $label) { + if (!is_null($pages) && ($id == 'document_id' || $id == 'document_page')) { + $infos = $pages[$l['page']]; + $value = $infos[$id]; + } else { + if (is_bool($l[$id])) { + $l[$id] = $l[$id] ? 1 : 0; + } + if ($id == 'numerotation') { + if ($l[$id] == 'false') { + $l[$id] = 'physical'; + } + } + $value = $l[$id]; + } + + $s->setCellValueByColumnAndRow($i, $j, $value); + $s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT); + $i++; + } + $j++; + } + // Rulers + $s = $xls->createSheet(); + $s->setTitle('Rulers'); + + $rcols = array('document_id', 'document_page', 'page', 'type', 'pos'); + $i = 0; + // Labels + foreach ($rcols as $id) { + $s->setCellValueByColumnAndRow($i, 1, $id); + $s->getColumnDimensionByColumn($i)->setAutoSize(true); + $s->getStyleByColumnAndRow($i, 1)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); + $i++; + } + + // Contents + $j = 2; + foreach ($rulers as $r) { + $i = 0; + foreach ($rcols as $id) { + if (!is_null($pages) && ($id == 'document_id' || $id == 'document_page')) { + $infos = $pages[$r['page']]; + $value = $infos[$id]; + } else { + $value = $r[$id]; + } + $s->setCellValueByColumnAndRow($i, $j, $value); + $s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT); + $i++; + } + $j++; + } + + $xls->setActiveSheetIndex(0); + return $xls; + } + + public static function setDocumentLinks($document_id, $links, $rulers, $user, $comments, $time) { + global $core; + $c = $core->con->openCursor('document_links_versions'); + $c1 = $core->con->openCursor('document_links'); + $c1->document_id=$c->document_id=$document_id; + $c1->links = $c->links = $links; + $c1->rulers = $c->rulers = $rulers; + $c->comments = $comments; + $c->user = $user; + $c->update = $time; + $c->insert(); + + $core->con->execute('DELETE FROM document_links WHERE document_id=' . $document_id); + $c1->insert(); + } + + public static function getLinksAndRulers($book_id, &$links, &$rulers, $time=null) { + + global $core; + + if (is_null($time)) { + $timeQuery = 'ORDER BY `update` DESC LIMIT 1'; + } else { + $timeQuery = 'AND `update`=' . $time; + } + + $daoBook = new wsDAOBook($core->con); + $pages = $daoBook->getPagesOfBookAt($book_id, $time); + + foreach ($pages as $p => $infos) { + $documents[] = $infos['document_id']; + } + $documents = array_unique($documents); + + $tlinks = array(); + $trulers = array(); + + $links = array(); + $rulers = array(); + + foreach ($documents as $d) { + $r = $core->con->select('SELECT * FROM document_links_versions WHERE document_id=' . $d . ' ' . $timeQuery); + + if (mb_substr($r->links, 1, 1) == ':') { + $ll = unserialize($r->links); + $rr = unserialize($r->rulers); + } else { + $ll = json_decode($r->links, true); + $rr = json_decode($r->rulers, true); + } + $tlinks[$d] = $ll; + $trulers[$d] = $rr; + } + + $i = 1; + foreach ($pages as $p => $infos) { + if (isset($tlinks[$infos['document_id']][$infos['document_page']])) { + $l = $tlinks[$infos['document_id']][$infos['document_page']]; + foreach ($l as $link) { + $link = (array) $link; + $link['page'] = $p; + $link['id'] = $i; + $links[] = $link; + } + } + if (isset($trulers[$infos['document_id']][$infos['document_page']])) { + $ru = $trulers[$infos['document_id']][$infos['document_page']]; + foreach ($ru as $ruler) { + $ruler['page'] = $p; + $rulers[] = $ruler; + } + } + } + + $daoBook = new wsDAOBook($core->con); + $book = $daoBook->selectById($book_id); + + $rulers = array_merge($rulers, $book->specialRulers); + $links = array_merge($links, $book->specialLinks); + } + +} + +?> diff --git a/inc/ws/_common.php b/inc/ws/_common.php index e66a211d4..16e1a2ccb 100644 --- a/inc/ws/_common.php +++ b/inc/ws/_common.php @@ -8,23 +8,5 @@ require_once(dirname(__FILE__) . '/Util/_common.php'); $GLOBALS['ajaxClasses'][] = 'wsAjax'; -$core->url->register('flash', 'flash', '^flash(.*)$', array('wsFlash', 'in')); -$core->url->register('services', 'services', '^services(.*)$', array('wsServices', 'in')); -$core->url->register('maintenance', 'maintenance', '^maintenance(.*)$', array('wsMaintenance', 'in')); -$core->url->register('editor', 'editor', '^editor/(.*)$', array('wsUrl', 'editor')); -$core->url->register('restoreLinks', 'restoreLinks', '^restoreLinks/(.*)$', array('wsUrl', 'restoreLinks')); -$core->url->register('viewer', 'viewer', '^viewer/(.*)$', array('wsUrl', 'viewer')); -$core->url->register('vieweru', 'vieweru', '^vieweru/(.*)$', array('wsUrl', 'vieweru')); -$core->url->register('viewerp', 'viewerp', '^viewerp/(.*)$', array('wsUrl', 'viewerp')); -$core->url->register('viewerh', 'viewerh', '^viewerh/(.*)$', array('wsUrl', 'viewerh')); -$core->url->register('viewerhu', 'viewerhu', '^viewerhu/(.*)$', array('wsUrl', 'viewerhu')); -$core->url->register('viewerht', 'viewerht', '^viewerht/(.*)$', array('wsUrl', 'viewerht')); -if (DEV) { - $tools = ROOT . '/../inc/tools/'; - cubePHP::appendEnv('PATH', $tools); - cubePHP::appendEnv('PATH', $tools . 'gs8.70/bin/'); - cubePHP::appendEnv('PATH', $tools . 'gs8.70/lib/'); - cubePHP::setEnv('GS_FONTPATH', FONT_PATH); -} ?> \ No newline at end of file diff --git a/inc/ws/prepend.php b/inc/ws/prepend.php new file mode 100644 index 000000000..2df598ad6 --- /dev/null +++ b/inc/ws/prepend.php @@ -0,0 +1,22 @@ +url->register('flash', 'flash', '^flash(.*)$', array('wsFlash', 'in')); +$core->url->register('services', 'services', '^services(.*)$', array('wsServices', 'in')); +$core->url->register('maintenance', 'maintenance', '^maintenance(.*)$', array('wsMaintenance', 'in')); +$core->url->register('editor', 'editor', '^editor/(.*)$', array('wsUrl', 'editor')); +$core->url->register('restoreLinks', 'restoreLinks', '^restoreLinks/(.*)$', array('wsUrl', 'restoreLinks')); +$core->url->register('viewer', 'viewer', '^viewer/(.*)$', array('wsUrl', 'viewer')); +$core->url->register('vieweru', 'vieweru', '^vieweru/(.*)$', array('wsUrl', 'vieweru')); +$core->url->register('viewerp', 'viewerp', '^viewerp/(.*)$', array('wsUrl', 'viewerp')); +$core->url->register('viewerh', 'viewerh', '^viewerh/(.*)$', array('wsUrl', 'viewerh')); +$core->url->register('viewerhu', 'viewerhu', '^viewerhu/(.*)$', array('wsUrl', 'viewerhu')); +$core->url->register('viewerht', 'viewerht', '^viewerht/(.*)$', array('wsUrl', 'viewerht')); + +if (DEV) { + $tools = ROOT . '/../inc/tools/'; + cubePHP::appendEnv('PATH', $tools); + cubePHP::appendEnv('PATH', $tools . 'gs8.70/bin/'); + cubePHP::appendEnv('PATH', $tools . 'gs8.70/lib/'); + cubePHP::setEnv('GS_FONTPATH', FONT_PATH); +} +?> diff --git a/js/ws.js b/js/ws.js index 431c9727f..b2a7f5ff2 100644 --- a/js/ws.js +++ b/js/ws.js @@ -36,7 +36,7 @@ function load_ws(){ url : SITE_PATH+'ajax/'+$(this).attr('action'), success : function(data){ window.opener.document.getElementById("composerSwf").reloadLinks(); - //window.close(); + window.close(); } }); return false;