From cffa4edb722b080091cb417b734dbff1907eafb2 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 8 Sep 2010 01:43:40 +0200 Subject: [PATCH] provide a basic viewer for text files --- inc/lib_base.php | 9 ++++++ inc/templates/header.php | 3 ++ plugins/textviewer/lib_textviewer.php | 5 ++++ plugins/textviewer/plugin.xml | 14 ++++++++++ plugins/textviewer/style.css | 26 +++++++++++++++++ plugins/textviewer/textviewer.js | 40 +++++++++++++++++++++++++++ 6 files changed, 97 insertions(+) create mode 100644 plugins/textviewer/lib_textviewer.php create mode 100644 plugins/textviewer/plugin.xml create mode 100644 plugins/textviewer/style.css create mode 100644 plugins/textviewer/textviewer.js diff --git a/inc/lib_base.php b/inc/lib_base.php index 6cf820207b6..19288f58c73 100644 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -112,6 +112,7 @@ $loginresult=OC_USER::loginlisener(); */ class OC_UTIL { public static $scripts=array(); + public static $styles=array(); private static $fsSetup=false; public static function setupFS(){// configure the initial filesystem based on the configuration @@ -182,6 +183,14 @@ class OC_UTIL { public static function addScript($url){ self::$scripts[]=$url; } + /** + * add a css file + * + * @param url $url + */ + public static function addStyle($url){ + self::$styles[]=$url; + } /** * array to store all the optional navigation buttons of the plugins diff --git a/inc/templates/header.php b/inc/templates/header.php index e016cd9f021..f39ac9debb9 100644 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -31,6 +31,9 @@ foreach(OC_UTIL::$scripts as $script){ echo("\n"); } +foreach(OC_UTIL::$styles as $style){ + echo("\n"); +} ?>