From 36196b6c2d68ba7de74b8314743539b043325198 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 2 Oct 2011 19:42:14 +0200 Subject: use browsercache for gallery covers --- apps/gallery/ajax/getCovers.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/gallery/ajax/getCovers.php b/apps/gallery/ajax/getCovers.php index d56bf6fa4b7..ebda8d3e47f 100644 --- a/apps/gallery/ajax/getCovers.php +++ b/apps/gallery/ajax/getCovers.php @@ -61,6 +61,12 @@ while (($i = $result->fetchRow()) && $counter < $numOfItems) { header('Content-Type: image/png'); +$offset = 3600 * 24; +// calc the string in GMT not localtime and add the offset +header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"); +header('Cache-Control: max-age=3600, must-revalidate'); +header('Pragma: public'); + imagepng($targetImg); imagedestroy($targetImg); ?> -- cgit v1.2.3 From 7579fc7bc9c894182b3de9bb9007aaa4b554b7fc Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Tue, 4 Oct 2011 21:39:13 +0200 Subject: updated margins --- apps/calendar/css/style.css | 3 +-- apps/media/css/music.css | 4 ++-- core/css/styles.css | 4 ++-- files/css/files.css | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css index 5e19b88f55a..ca9f3274e3c 100644 --- a/apps/calendar/css/style.css +++ b/apps/calendar/css/style.css @@ -5,7 +5,7 @@ * See the COPYING-README file. */ -#view {margin-left: 10px; float: left; font-size: 12px;} +#view { float: left; font-size: 12px; height: 100%;} #datecontrol {text-align: center;} #datecontrol_left{font-size: 12px;} #datecontrol_right{font-size: 12px;} @@ -17,7 +17,6 @@ #editentry_dialog {display: none;} #parsingfail_dialog{display: none;} -#view {margin-left: 10px; float: left; font-size: 12px; height: 100%;} #calendar_holder {height: 100%; width: 100%;} #onedayview, #oneweekview, #fourweeksview, #onemonthview, #listview {display: none; position: absolute;bottom: 0; right: 0; left: 160px; top: 80px;} #onedayview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;} diff --git a/apps/media/css/music.css b/apps/media/css/music.css index 8575e6334a5..67d56075194 100644 --- a/apps/media/css/music.css +++ b/apps/media/css/music.css @@ -1,6 +1,6 @@ #controls ul.jp-controls { padding:0; } #controls ul.jp-controls li { display:inline; } -#controls ul.jp-controls li a { position:absolute; padding:.8em 1em; } +#controls ul.jp-controls li a { position:absolute; padding:.8em 1em .8em 0; } a.jp-play, a.jp-pause { left:2.5em; } a.jp-pause { display:none; } a.jp-next { left:5em; } @@ -39,7 +39,7 @@ tr.album td.artist { padding-left:1em; } tr.song td.artist { padding-left:2em; } .add {margin: 0 0.5em 0 0; } -#scan { position:absolute; right:13em; top:0em; } +#scan { position:absolute; right:13.5em; top:0em; } #scan .start { position:relative; display:inline; float:right; } #scan .stop { position:relative; display:inline; float:right; } #scan #scanprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; } diff --git a/core/css/styles.css b/core/css/styles.css index 84a024f95b9..5d4df586a8e 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -50,7 +50,7 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-shadow:#ffeedd 0 1px 0; -moz-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; box-shadow:0 1px 1px #f8f8f8, 0 1px 1px #ffeedd inset; } /* CONTENT ------------------------------------------------------------------ */ -#controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } +#controls { padding: 0 0.5em; width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } #controls .button { display:inline-block; } #content { margin:3.5em 0 0 12.5em; } #leftcontent, .leftcontent { position:fixed; overflow: auto; top:6.4em; width:20em; background:#f8f8f8; border-right:1px solid #ddd; } @@ -117,7 +117,7 @@ tbody tr:hover, tr:active { background-color:#f8f8f8; } #quotatext {padding: .6em 1em;} div.jp-play-bar, div.jp-seek-bar { padding:0; } -.pager { list-style:none; float:right; display:inline; margin:.7em 12.7em 0 0; } +.pager { list-style:none; float:right; display:inline; margin:.7em 13em 0 0; } .pager li { display:inline-block; } li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background:#ffe .8em .8em no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } diff --git a/files/css/files.css b/files/css/files.css index 1766d03d967..a8419e972ef 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -10,7 +10,7 @@ .file_upload_form, #file_newfolder_form { display:inline; float: left;} #fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; } .file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .5em; padding-left:2em; } -.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin:.1em 1em;} +.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin:.1em 1em .1em 0em;} .file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; } #file_newfolder_name { background-image:url('../../core/img/places/folder.svg'); font-weight:normal; width:7em; } -- cgit v1.2.3 From 0cde2a314656b1818d15b64139cca038930e0c24 Mon Sep 17 00:00:00 2001 From: Borjan Tchakaloff Date: Wed, 5 Oct 2011 14:27:50 +0400 Subject: Fixed the file sharing listing bug (filename is empty when it has no extension in a publicly shared folder). --- apps/files_sharing/get.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php index 083f48e1127..38f4b2daedc 100644 --- a/apps/files_sharing/get.php +++ b/apps/files_sharing/get.php @@ -30,8 +30,9 @@ if ($source !== false) { foreach (OC_Files::getdirectorycontent($source) as $i) { $i['date'] = OC_Util::formatDate($i['mtime'] ); if ($i['type'] == 'file') { - $i['extention'] = substr($i['name'], strrpos($i['name'], ".")); - $i['basename'] = substr($i['name'], 0, strrpos($i['name'], ".")); + $fileinfo = pathinfo($i['name']); + $i['basename'] = $fileinfo['filename']; + $i['extention'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : ''; } $i['directory'] = substr($i['directory'], $rootLength); if ($i['directory'] == "/") { -- cgit v1.2.3 From 3388381debdeb871533760109c91685f26d62044 Mon Sep 17 00:00:00 2001 From: Borjan Tchakaloff Date: Wed, 5 Oct 2011 14:31:33 +0400 Subject: Fixed the 'Undefined index "user_id"' bug when requesting a publicly shared folder and being logged-out. The OC_App::navigation array contains by default only the help menu. --- lib/app.php | 65 ++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/lib/app.php b/lib/app.php index cd4a7293e49..b9eea483a55 100644 --- a/lib/app.php +++ b/lib/app.php @@ -200,23 +200,36 @@ class OC_App{ */ public static function getSettingsNavigation(){ $l=new OC_L10N('core'); - $admin=array( - array( "id" => "core_users", "order" => 2, "href" => OC_Helper::linkTo( "settings", "users.php" ), "name" => $l->t("Users"), "icon" => OC_Helper::imagePath( "settings", "users.svg" )), - array( "id" => "core_apps", "order" => 3, "href" => OC_Helper::linkTo( "settings", "apps.php?installed" ), "name" => $l->t("Apps"), "icon" => OC_Helper::imagePath( "settings", "apps.svg" )), - ); - $settings=array( - array( "id" => "help", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "help.php" ), "name" => $l->t("Help"), "icon" => OC_Helper::imagePath( "settings", "help.svg" )), - array( "id" => "personal", "order" => 1, "href" => OC_Helper::linkTo( "settings", "personal.php" ), "name" => $l->t("Personal"), "icon" => OC_Helper::imagePath( "settings", "personal.svg" )) - ); - if(count(self::$settingsForms)>0){ - $settings[]=array( "id" => "settings", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "settings.php" ), "name" => $l->t("Settings"), "icon" => OC_Helper::imagePath( "settings", "settings.svg" )); - } - if(count(self::$adminForms)>0){ - $admin[]=array( "id" => "admin", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "admin.php" ), "name" => $l->t("Admin"), "icon" => OC_Helper::imagePath( "settings", "admin.svg" )); - } - if( OC_Group::inGroup( $_SESSION["user_id"], "admin" )){ - $settings=array_merge($admin,$settings); - } + + // by default, settings only contain the help menu + $settings = array( + array( "id" => "help", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "help.php" ), "name" => $l->t("Help"), "icon" => OC_Helper::imagePath( "settings", "help.svg" )) + ); + + // if the user is logged-in + if (OC_User::isLoggedIn()) { + // personal menu + $settings[] = array( "id" => "personal", "order" => 1, "href" => OC_Helper::linkTo( "settings", "personal.php" ), "name" => $l->t("Personal"), "icon" => OC_Helper::imagePath( "settings", "personal.svg" )); + + // if there're some settings forms + if(!empty(self::$settingsForms)) + // settings menu + $settings[]=array( "id" => "settings", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "settings.php" ), "name" => $l->t("Settings"), "icon" => OC_Helper::imagePath( "settings", "settings.svg" )); + + // if the user is an admin + if(OC_Group::inGroup( $_SESSION["user_id"], "admin" )) { + // admin users menu + $settings[] = array( "id" => "core_users", "order" => 2, "href" => OC_Helper::linkTo( "settings", "users.php" ), "name" => $l->t("Users"), "icon" => OC_Helper::imagePath( "settings", "users.svg" )); + // admin apps menu + $settings[] = array( "id" => "core_apps", "order" => 3, "href" => OC_Helper::linkTo( "settings", "apps.php?installed" ), "name" => $l->t("Apps"), "icon" => OC_Helper::imagePath( "settings", "apps.svg" )); + + // if there're some admin forms + if(!empty(self::$adminForms)) + // admins menu + $settings[]=array( "id" => "admin", "order" => 1000, "href" => OC_Helper::linkTo( "settings", "admin.php" ), "name" => $l->t("Admin"), "icon" => OC_Helper::imagePath( "settings", "admin.svg" )); + } + } + $navigation = self::proceedNavigation($settings); return $navigation; } @@ -237,7 +250,7 @@ class OC_App{ return $list; } - + /** * @brief Read app metadata from the info.xml file * @param string $appid id of the app or the path of the info.xml file @@ -261,7 +274,7 @@ class OC_App{ } return $data; } - + /** * @brief Returns the navigation * @returns associative array @@ -277,7 +290,7 @@ class OC_App{ $navigation = self::proceedNavigation( self::$navigation ); return $navigation; } - + /** * get the id of loaded app * @return string @@ -292,8 +305,8 @@ class OC_App{ return $topFolder; } } - - + + /** * get the forms for either settings, admin or personal */ @@ -315,28 +328,28 @@ class OC_App{ } return $forms; } - + /** * register a settings form to be shown */ public static function registerSettings($app,$page){ self::$settingsForms[]='apps/'.$app.'/'.$page.'.php'; } - + /** * register an admin form to be shown */ public static function registerAdmin($app,$page){ self::$adminForms[]='apps/'.$app.'/'.$page.'.php'; } - + /** * register a personal form to be shown */ public static function registerPersonal($app,$page){ self::$personalForms[]='apps/'.$app.'/'.$page.'.php'; } - + /** * get a list of all apps in the apps folder */ -- cgit v1.2.3 From 5570222b40194e6ef3a82857718dee2577818f79 Mon Sep 17 00:00:00 2001 From: Borjan Tchakaloff Date: Wed, 5 Oct 2011 15:16:34 +0400 Subject: Added the missing quotes on the filename. --- apps/files_sharing/get.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php index 083f48e1127..7d040689d41 100644 --- a/apps/files_sharing/get.php +++ b/apps/files_sharing/get.php @@ -70,7 +70,7 @@ if ($source !== false) { header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: public"); - header("Content-Disposition: filename=".basename($source)); + header('Content-Disposition: filename="'.basename($source).'"'); header("Content-Type: " . $mimetype); header("Content-Length: " . OC_Filesystem::filesize($source)); //download the file -- cgit v1.2.3 From 08c38c8158bab4f7f6d60c778a8614739719bc7f Mon Sep 17 00:00:00 2001 From: Stephen Rees-Carter Date: Thu, 6 Oct 2011 10:30:17 +1100 Subject: Updating .gitignore to ignore *.geany project files. --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ea8e5bd42fa..312dc0433aa 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,7 @@ RCS/* # netbeans nbproject -.DS_Store \ No newline at end of file +# geany +*.geany + +.DS_Store -- cgit v1.2.3 From c853fc75a1db418b3c892f2e82e723b63489d35e Mon Sep 17 00:00:00 2001 From: Stephen Rees-Carter Date: Thu, 6 Oct 2011 10:31:05 +1100 Subject: BUGFIX: removed the hard-coded Continent selection for Calendar Timezones. --- apps/calendar/templates/settings.php | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 19a1a543b46..afc35bf7f37 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -11,34 +11,36 @@ OC_UTIL::addStyle('', 'jquery.multiselect'); ?>
- -
+ + - + -
- -
+ +
+
- t('Calendar CalDAV syncing address:');?> -
+ t('Calendar CalDAV syncing address:');?> +
-- cgit v1.2.3 From c28f1e0276bef100b88b4df0bd8f2a0d7d888314 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 6 Oct 2011 11:14:07 +0200 Subject: Implement timezone fix from Stephen Rees-Carter --- apps/calendar/templates/settings.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 19a1a543b46..913e54dd8fc 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -16,16 +16,18 @@ OC_UTIL::addStyle('', 'jquery.multiselect'); '; - echo ''; - endif; - $city=$ex[1]; - $continent=$ex[0]; - echo ''; + $ex=explode('/', $timezone, 2);//obtain continent,city + if (!isset($ex[1])) { + $ex[1] = $ex[0]; + $ex[0] = "Other"; + } + if ($continent!=$ex[0]): + if ($continent!="") echo ''; + echo ''; endif; + $city=$ex[1]; + $continent=$ex[0]; + echo ''; endforeach;?> -- cgit v1.2.3 From 4786ed321e802f8a63cff2bc4cb36461a3385971 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 6 Oct 2011 11:45:49 +0200 Subject: Replace _ in timezone setting with a space --- apps/calendar/templates/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 913e54dd8fc..c6664d512dc 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -25,7 +25,7 @@ OC_UTIL::addStyle('', 'jquery.multiselect'); if ($continent!="") echo ''; echo ''; endif; - $city=$ex[1]; + $city=strtr($ex[1], '_', ' '); $continent=$ex[0]; echo ''; endforeach;?> -- cgit v1.2.3 From b0847a61f52b8056365d26b52d23dddab329b62d Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 6 Oct 2011 21:22:01 +0200 Subject: Start using OC_JSON in gallery app --- apps/gallery/ajax/cover.php | 7 ++----- apps/gallery/ajax/createAlbum.php | 9 +++------ apps/gallery/ajax/getAlbums.php | 9 +++------ apps/gallery/ajax/getCovers.php | 7 ++----- apps/gallery/ajax/scanForAlbums.php | 11 ++++------- apps/gallery/ajax/thumbnail.php | 7 ++----- apps/gallery/index.php | 1 + 7 files changed, 17 insertions(+), 34 deletions(-) diff --git a/apps/gallery/ajax/cover.php b/apps/gallery/ajax/cover.php index 44d73028510..d83f4daaa52 100644 --- a/apps/gallery/ajax/cover.php +++ b/apps/gallery/ajax/cover.php @@ -1,5 +1,7 @@ 'error', 'data' => array( 'message' => 'You need to log in.'))); - exit(); -} $box_size = 200; $album_name = $_GET['album']; $x = $_GET['x']; diff --git a/apps/gallery/ajax/createAlbum.php b/apps/gallery/ajax/createAlbum.php index 3a490bdc3bd..610f761b72a 100644 --- a/apps/gallery/ajax/createAlbum.php +++ b/apps/gallery/ajax/createAlbum.php @@ -1,14 +1,11 @@ 'error', 'data' => array( 'message' => 'You need to log in.'))); - exit(); -} +OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('gallery'); $stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_albums ("uid_owner", "album_name") VALUES ("'.OC_User::getUser().'", "'.$_GET['album_name'].'")'); $stmt->execute(array()); -echo json_encode(array( 'status' => 'success', 'name' => $_GET['album_name'])); +OC_JSON::success(array('name' => $_GET['album_name'])); ?> diff --git a/apps/gallery/ajax/getAlbums.php b/apps/gallery/ajax/getAlbums.php index 2829dae81f3..38bea74636f 100644 --- a/apps/gallery/ajax/getAlbums.php +++ b/apps/gallery/ajax/getAlbums.php @@ -1,10 +1,7 @@ 'error', 'message' => 'You need to log in')); - exit(); -} +OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('gallery'); $a = array(); $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ?'); @@ -17,6 +14,6 @@ while ($r = $result->fetchRow()) { $a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10)); } -echo json_encode(array('status'=>'success', 'albums'=>$a)); +OC_JSON::success(array('albums'=>$a)); ?> diff --git a/apps/gallery/ajax/getCovers.php b/apps/gallery/ajax/getCovers.php index 57737f2fdd6..6b2224b5f01 100644 --- a/apps/gallery/ajax/getCovers.php +++ b/apps/gallery/ajax/getCovers.php @@ -1,5 +1,7 @@ 'error', 'data' => array( 'message' => 'You need to log in.'))); - exit(); -} $box_size = 200; $album_name= $_GET['album_name']; diff --git a/apps/gallery/ajax/scanForAlbums.php b/apps/gallery/ajax/scanForAlbums.php index a04ad62b1bf..de0b141a367 100644 --- a/apps/gallery/ajax/scanForAlbums.php +++ b/apps/gallery/ajax/scanForAlbums.php @@ -1,14 +1,11 @@ 'error', 'message' => 'You need to log in')); - exit(); -} - -echo json_encode(array( 'status' => 'success', 'albums' => OC_GALLERY_SCANNER::scan(''))); -//echo json_encode(array('status' => 'success', 'albums' => array(array('name' => 'test', 'imagesCount' => 1, 'images' => array('dupa'))))); +OC_JSON::success(array('albums' => OC_GALLERY_SCANNER::scan(''))); +//OC_JSON::success(array('albums' => array(array('name' => 'test', 'imagesCount' => 1, 'images' => array('dupa'))))); ?> diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php index db428eeff34..f24782390f6 100644 --- a/apps/gallery/ajax/thumbnail.php +++ b/apps/gallery/ajax/thumbnail.php @@ -1,5 +1,7 @@ 'error', 'data' => array( 'message' => 'You need to log in.'))); - exit(); -} $box_size = 200; $img = $_GET['img']; diff --git a/apps/gallery/index.php b/apps/gallery/index.php index c8d5892e555..87fdafcf13c 100644 --- a/apps/gallery/index.php +++ b/apps/gallery/index.php @@ -2,6 +2,7 @@ require_once('../../lib/base.php'); OC_Util::checkLoggedIn(); +OC_Util::checkAppEnabled('gallery'); OC_App::setActiveNavigationEntry( 'gallery_index' ); -- cgit v1.2.3 From 3cc7212c8282d5be2d53ab3b5aa35ec6247cfcbe Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 6 Oct 2011 21:22:55 +0200 Subject: Add icon for calendar color selector --- apps/calendar/css/style.css | 2 +- core/img/actions/selected.png | Bin 0 -> 276 bytes core/img/actions/selected.svg | 73 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 core/img/actions/selected.png create mode 100644 core/img/actions/selected.svg diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css index 5e19b88f55a..e1c89326aa3 100644 --- a/apps/calendar/css/style.css +++ b/apps/calendar/css/style.css @@ -60,4 +60,4 @@ select#category{width:140px;} button.category{margin:0 3px;} .calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;} -.calendar-colorpicker-color.active{background-image:url("../../../core/img/jquery-ui/ui-icons_222222_256x240.png");background-position:-62px -143px;} +.calendar-colorpicker-color.active{background-image:url("../../../core/img/actions/selected.svg");background-position:2px 2px;} diff --git a/core/img/actions/selected.png b/core/img/actions/selected.png new file mode 100644 index 00000000000..98c29df9cf5 Binary files /dev/null and b/core/img/actions/selected.png differ diff --git a/core/img/actions/selected.svg b/core/img/actions/selected.svg new file mode 100644 index 00000000000..3294f68c68d --- /dev/null +++ b/core/img/actions/selected.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + -- cgit v1.2.3 From 980a0893f0070de007d5c3842994c6720b381117 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 7 Oct 2011 16:03:26 +0200 Subject: Change colorselector to use border for selected color --- apps/calendar/css/style.css | 4 +-- apps/calendar/js/calendar.js | 4 +-- core/img/actions/selected.png | Bin 276 -> 0 bytes core/img/actions/selected.svg | 73 ------------------------------------------ 4 files changed, 3 insertions(+), 78 deletions(-) delete mode 100644 core/img/actions/selected.png delete mode 100644 core/img/actions/selected.svg diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css index 14b7d45523e..80d29ca8974 100644 --- a/apps/calendar/css/style.css +++ b/apps/calendar/css/style.css @@ -58,5 +58,5 @@ color:#A9A9A9; select#category{width:140px;} button.category{margin:0 3px;} -.calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;} -.calendar-colorpicker-color.active{background-image:url("../../../core/img/actions/selected.svg");background-position:2px 2px;} +.calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;border:2px solid transparent;} +.calendar-colorpicker-color.active{border:2px solid black;} diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 131325007a0..87954b7aac6 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -491,8 +491,6 @@ Calendar={ // based on jquery-colorpicker at jquery.webspirited.com var obj = $('.colorpicker', container); var picker = $('
'); - var size = 20; - //build an array of colors var colors = {}; $(obj).children('option').each(function(i, elm) { @@ -501,7 +499,7 @@ Calendar={ colors[i].label = $(elm).text(); }); for (var i in colors) { - picker.append(''); + picker.append(''); } picker.delegate(".calendar-colorpicker-color", "click", function() { $(obj).val($(this).attr('rel')); diff --git a/core/img/actions/selected.png b/core/img/actions/selected.png deleted file mode 100644 index 98c29df9cf5..00000000000 Binary files a/core/img/actions/selected.png and /dev/null differ diff --git a/core/img/actions/selected.svg b/core/img/actions/selected.svg deleted file mode 100644 index 3294f68c68d..00000000000 --- a/core/img/actions/selected.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - -- cgit v1.2.3 From 0aaa1fb64ef536fab842a9e96db7f29d2ed17419 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Fri, 7 Oct 2011 16:05:29 +0200 Subject: added Silk icons by Mark James (CC-BY) --- COPYING-README | 15 +- core/img/filetypes/addressbook.png | Bin 0 -> 770 bytes core/img/filetypes/audio.png | Bin 561 -> 0 bytes core/img/filetypes/audio.svg | 1670 ------------------------------- core/img/filetypes/c.png | Bin 0 -> 587 bytes core/img/filetypes/calendar.png | Bin 0 -> 675 bytes core/img/filetypes/code.png | Bin 0 -> 603 bytes core/img/filetypes/cplusplus.png | Bin 0 -> 621 bytes core/img/filetypes/csharp.png | Bin 0 -> 700 bytes core/img/filetypes/css.png | Bin 0 -> 524 bytes core/img/filetypes/database.png | Bin 0 -> 390 bytes core/img/filetypes/document.png | Bin 0 -> 342 bytes core/img/filetypes/feed.png | Bin 0 -> 691 bytes core/img/filetypes/file.png | Bin 391 -> 0 bytes core/img/filetypes/file.svg | 1841 ----------------------------------- core/img/filetypes/flash.png | Bin 0 -> 582 bytes core/img/filetypes/folder.png | Bin 0 -> 537 bytes core/img/filetypes/h.png | Bin 0 -> 603 bytes core/img/filetypes/html.png | Bin 0 -> 578 bytes core/img/filetypes/image.png | Bin 307 -> 688 bytes core/img/filetypes/image.svg | 1697 -------------------------------- core/img/filetypes/javascript.png | Bin 0 -> 859 bytes core/img/filetypes/link.png | Bin 0 -> 923 bytes core/img/filetypes/music.png | Bin 0 -> 385 bytes core/img/filetypes/other.png | Bin 0 -> 555 bytes core/img/filetypes/pdf.png | Bin 0 -> 591 bytes core/img/filetypes/photo.png | Bin 0 -> 606 bytes core/img/filetypes/php.png | Bin 0 -> 538 bytes core/img/filetypes/presentation.png | Bin 0 -> 588 bytes core/img/filetypes/readme.txt | 22 + core/img/filetypes/ruby.png | Bin 0 -> 626 bytes core/img/filetypes/spreadsheet.png | Bin 0 -> 566 bytes core/img/filetypes/typeface.png | Bin 0 -> 813 bytes core/img/filetypes/vcard.png | Bin 0 -> 533 bytes core/img/filetypes/vector.png | Bin 0 -> 481 bytes core/img/filetypes/video.png | Bin 0 -> 653 bytes core/img/places/file.png | Bin 0 -> 391 bytes core/img/places/file.svg | 1841 +++++++++++++++++++++++++++++++++++ core/img/places/image.png | Bin 0 -> 307 bytes core/img/places/image.svg | 1697 ++++++++++++++++++++++++++++++++ core/img/places/music.png | Bin 0 -> 561 bytes core/img/places/music.svg | 1670 +++++++++++++++++++++++++++++++ 42 files changed, 5238 insertions(+), 5215 deletions(-) create mode 100644 core/img/filetypes/addressbook.png delete mode 100644 core/img/filetypes/audio.png delete mode 100644 core/img/filetypes/audio.svg create mode 100644 core/img/filetypes/c.png create mode 100644 core/img/filetypes/calendar.png create mode 100644 core/img/filetypes/code.png create mode 100644 core/img/filetypes/cplusplus.png create mode 100644 core/img/filetypes/csharp.png create mode 100644 core/img/filetypes/css.png create mode 100644 core/img/filetypes/database.png create mode 100644 core/img/filetypes/document.png create mode 100644 core/img/filetypes/feed.png delete mode 100644 core/img/filetypes/file.png delete mode 100644 core/img/filetypes/file.svg create mode 100644 core/img/filetypes/flash.png create mode 100644 core/img/filetypes/folder.png create mode 100644 core/img/filetypes/h.png create mode 100644 core/img/filetypes/html.png delete mode 100644 core/img/filetypes/image.svg create mode 100644 core/img/filetypes/javascript.png create mode 100644 core/img/filetypes/link.png create mode 100644 core/img/filetypes/music.png create mode 100644 core/img/filetypes/other.png create mode 100644 core/img/filetypes/pdf.png create mode 100644 core/img/filetypes/photo.png create mode 100644 core/img/filetypes/php.png create mode 100644 core/img/filetypes/presentation.png create mode 100644 core/img/filetypes/readme.txt create mode 100644 core/img/filetypes/ruby.png create mode 100644 core/img/filetypes/spreadsheet.png create mode 100644 core/img/filetypes/typeface.png create mode 100644 core/img/filetypes/vcard.png create mode 100644 core/img/filetypes/vector.png create mode 100644 core/img/filetypes/video.png create mode 100644 core/img/places/file.png create mode 100644 core/img/places/file.svg create mode 100644 core/img/places/image.png create mode 100644 core/img/places/image.svg create mode 100644 core/img/places/music.png create mode 100644 core/img/places/music.svg diff --git a/COPYING-README b/COPYING-README index b0caca2ad21..49e035186ed 100644 --- a/COPYING-README +++ b/COPYING-README @@ -2,13 +2,14 @@ Files in ownCloud are licensed under the Affero General Public License version 3 the text of which can be found in COPYING-AGPL, or any later version of the AGPL, unless otherwise noted. -Components of ownCloud: -* jQuery is dual licensed under MIT and GPL -* HTTP is three clause BSD license -* MDB2 uses a custom license in the BSD style -* User is AGPL -* XML/RPC is both MIT and PHP license +Licensing of components: +* jQuery: MIT / GPL +* HTTP: 3 clause BSD +* MDB2: BSD style custom +* User: AGPL +* XML/RPC: MIT / PHP +* Silk icons: Creative Commons Attribution All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. -Attribution information for ownCloud is contained in the AUTHORS file. +Attribution information for ownCloud is contained in the AUTHORS file. \ No newline at end of file diff --git a/core/img/filetypes/addressbook.png b/core/img/filetypes/addressbook.png new file mode 100644 index 00000000000..b73419ba820 Binary files /dev/null and b/core/img/filetypes/addressbook.png differ diff --git a/core/img/filetypes/audio.png b/core/img/filetypes/audio.png deleted file mode 100644 index 4c844425d64..00000000000 Binary files a/core/img/filetypes/audio.png and /dev/null differ diff --git a/core/img/filetypes/audio.svg b/core/img/filetypes/audio.svg deleted file mode 100644 index 1f397660970..00000000000 --- a/core/img/filetypes/audio.svg +++ /dev/null @@ -1,1670 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/img/filetypes/c.png b/core/img/filetypes/c.png new file mode 100644 index 00000000000..34a05cccf06 Binary files /dev/null and b/core/img/filetypes/c.png differ diff --git a/core/img/filetypes/calendar.png b/core/img/filetypes/calendar.png new file mode 100644 index 00000000000..658913852d6 Binary files /dev/null and b/core/img/filetypes/calendar.png differ diff --git a/core/img/filetypes/code.png b/core/img/filetypes/code.png new file mode 100644 index 00000000000..0c76bd12977 Binary files /dev/null and b/core/img/filetypes/code.png differ diff --git a/core/img/filetypes/cplusplus.png b/core/img/filetypes/cplusplus.png new file mode 100644 index 00000000000..a87cf847cb7 Binary files /dev/null and b/core/img/filetypes/cplusplus.png differ diff --git a/core/img/filetypes/csharp.png b/core/img/filetypes/csharp.png new file mode 100644 index 00000000000..ffb8fc932f3 Binary files /dev/null and b/core/img/filetypes/csharp.png differ diff --git a/core/img/filetypes/css.png b/core/img/filetypes/css.png new file mode 100644 index 00000000000..23f3101811f Binary files /dev/null and b/core/img/filetypes/css.png differ diff --git a/core/img/filetypes/database.png b/core/img/filetypes/database.png new file mode 100644 index 00000000000..3d09261a26e Binary files /dev/null and b/core/img/filetypes/database.png differ diff --git a/core/img/filetypes/document.png b/core/img/filetypes/document.png new file mode 100644 index 00000000000..813f712f726 Binary files /dev/null and b/core/img/filetypes/document.png differ diff --git a/core/img/filetypes/feed.png b/core/img/filetypes/feed.png new file mode 100644 index 00000000000..315c4f4fa62 Binary files /dev/null and b/core/img/filetypes/feed.png differ diff --git a/core/img/filetypes/file.png b/core/img/filetypes/file.png deleted file mode 100644 index 49790448897..00000000000 Binary files a/core/img/filetypes/file.png and /dev/null differ diff --git a/core/img/filetypes/file.svg b/core/img/filetypes/file.svg deleted file mode 100644 index 478714b75d1..00000000000 --- a/core/img/filetypes/file.svg +++ /dev/null @@ -1,1841 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/img/filetypes/flash.png b/core/img/filetypes/flash.png new file mode 100644 index 00000000000..5769120b1b6 Binary files /dev/null and b/core/img/filetypes/flash.png differ diff --git a/core/img/filetypes/folder.png b/core/img/filetypes/folder.png new file mode 100644 index 00000000000..784e8fa4823 Binary files /dev/null and b/core/img/filetypes/folder.png differ diff --git a/core/img/filetypes/h.png b/core/img/filetypes/h.png new file mode 100644 index 00000000000..e902abb0767 Binary files /dev/null and b/core/img/filetypes/h.png differ diff --git a/core/img/filetypes/html.png b/core/img/filetypes/html.png new file mode 100644 index 00000000000..55d1072eafd Binary files /dev/null and b/core/img/filetypes/html.png differ diff --git a/core/img/filetypes/image.png b/core/img/filetypes/image.png index 980a7c69813..23a37b891c2 100644 Binary files a/core/img/filetypes/image.png and b/core/img/filetypes/image.png differ diff --git a/core/img/filetypes/image.svg b/core/img/filetypes/image.svg deleted file mode 100644 index 26c3d6312c2..00000000000 --- a/core/img/filetypes/image.svg +++ /dev/null @@ -1,1697 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/img/filetypes/javascript.png b/core/img/filetypes/javascript.png new file mode 100644 index 00000000000..63fe6ceff5b Binary files /dev/null and b/core/img/filetypes/javascript.png differ diff --git a/core/img/filetypes/link.png b/core/img/filetypes/link.png new file mode 100644 index 00000000000..68f21d30116 Binary files /dev/null and b/core/img/filetypes/link.png differ diff --git a/core/img/filetypes/music.png b/core/img/filetypes/music.png new file mode 100644 index 00000000000..a8b3ede3df9 Binary files /dev/null and b/core/img/filetypes/music.png differ diff --git a/core/img/filetypes/other.png b/core/img/filetypes/other.png new file mode 100644 index 00000000000..8443c23eb94 Binary files /dev/null and b/core/img/filetypes/other.png differ diff --git a/core/img/filetypes/pdf.png b/core/img/filetypes/pdf.png new file mode 100644 index 00000000000..8f8095e46fa Binary files /dev/null and b/core/img/filetypes/pdf.png differ diff --git a/core/img/filetypes/photo.png b/core/img/filetypes/photo.png new file mode 100644 index 00000000000..4a158fef7e0 Binary files /dev/null and b/core/img/filetypes/photo.png differ diff --git a/core/img/filetypes/php.png b/core/img/filetypes/php.png new file mode 100644 index 00000000000..7868a25945c Binary files /dev/null and b/core/img/filetypes/php.png differ diff --git a/core/img/filetypes/presentation.png b/core/img/filetypes/presentation.png new file mode 100644 index 00000000000..c4eff0387d5 Binary files /dev/null and b/core/img/filetypes/presentation.png differ diff --git a/core/img/filetypes/readme.txt b/core/img/filetypes/readme.txt new file mode 100644 index 00000000000..400a64d7857 --- /dev/null +++ b/core/img/filetypes/readme.txt @@ -0,0 +1,22 @@ +Silk icon set 1.3 + +_________________________________________ +Mark James +http://www.famfamfam.com/lab/icons/silk/ +_________________________________________ + +This work is licensed under a +Creative Commons Attribution 2.5 License. +[ http://creativecommons.org/licenses/by/2.5/ ] + +This means you may use it for any purpose, +and make any changes you like. +All I ask is that you include a link back +to this page in your credits. + +Are you using this icon set? Send me an email +(including a link or picture if available) to +mjames@gmail.com + +Any other questions about this icon set please +contact mjames@gmail.com \ No newline at end of file diff --git a/core/img/filetypes/ruby.png b/core/img/filetypes/ruby.png new file mode 100644 index 00000000000..f59b7c4365f Binary files /dev/null and b/core/img/filetypes/ruby.png differ diff --git a/core/img/filetypes/spreadsheet.png b/core/img/filetypes/spreadsheet.png new file mode 100644 index 00000000000..abcd93689a0 Binary files /dev/null and b/core/img/filetypes/spreadsheet.png differ diff --git a/core/img/filetypes/typeface.png b/core/img/filetypes/typeface.png new file mode 100644 index 00000000000..81e41de7d3a Binary files /dev/null and b/core/img/filetypes/typeface.png differ diff --git a/core/img/filetypes/vcard.png b/core/img/filetypes/vcard.png new file mode 100644 index 00000000000..c02f315d207 Binary files /dev/null and b/core/img/filetypes/vcard.png differ diff --git a/core/img/filetypes/vector.png b/core/img/filetypes/vector.png new file mode 100644 index 00000000000..a1291c2dfad Binary files /dev/null and b/core/img/filetypes/vector.png differ diff --git a/core/img/filetypes/video.png b/core/img/filetypes/video.png new file mode 100644 index 00000000000..b0ce7bb198a Binary files /dev/null and b/core/img/filetypes/video.png differ diff --git a/core/img/places/file.png b/core/img/places/file.png new file mode 100644 index 00000000000..49790448897 Binary files /dev/null and b/core/img/places/file.png differ diff --git a/core/img/places/file.svg b/core/img/places/file.svg new file mode 100644 index 00000000000..478714b75d1 --- /dev/null +++ b/core/img/places/file.svg @@ -0,0 +1,1841 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/img/places/image.png b/core/img/places/image.png new file mode 100644 index 00000000000..980a7c69813 Binary files /dev/null and b/core/img/places/image.png differ diff --git a/core/img/places/image.svg b/core/img/places/image.svg new file mode 100644 index 00000000000..26c3d6312c2 --- /dev/null +++ b/core/img/places/image.svg @@ -0,0 +1,1697 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/img/places/music.png b/core/img/places/music.png new file mode 100644 index 00000000000..4c844425d64 Binary files /dev/null and b/core/img/places/music.png differ diff --git a/core/img/places/music.svg b/core/img/places/music.svg new file mode 100644 index 00000000000..1f397660970 --- /dev/null +++ b/core/img/places/music.svg @@ -0,0 +1,1670 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From fa72f1c3cc0f2767be68717c6b0fb8aa3143cd34 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Fri, 7 Oct 2011 16:18:47 +0200 Subject: some icon corrections --- apps/gallery/appinfo/app.php | 4 +- apps/media/appinfo/app.php | 2 +- core/img/filetypes/addressbook.png | Bin 770 -> 0 bytes core/img/filetypes/file.png | Bin 0 -> 294 bytes core/img/filetypes/presentation.png | Bin 588 -> 519 bytes core/img/places/image.png | Bin 307 -> 0 bytes core/img/places/image.svg | 1697 ----------------------------------- core/img/places/picture.png | Bin 0 -> 307 bytes core/img/places/picture.svg | 1697 +++++++++++++++++++++++++++++++++++ 9 files changed, 1700 insertions(+), 1700 deletions(-) delete mode 100644 core/img/filetypes/addressbook.png create mode 100644 core/img/filetypes/file.png delete mode 100644 core/img/places/image.png delete mode 100644 core/img/places/image.svg create mode 100644 core/img/places/picture.png create mode 100644 core/img/places/picture.svg diff --git a/apps/gallery/appinfo/app.php b/apps/gallery/appinfo/app.php index 5760bb149d8..8f855c470e5 100644 --- a/apps/gallery/appinfo/app.php +++ b/apps/gallery/appinfo/app.php @@ -8,7 +8,7 @@ OC_App::addNavigationEntry( array( 'id' => 'gallery_index', 'order' => 20, 'href' => OC_Helper::linkTo('gallery', 'index.php'), - 'icon' => OC_Helper::linkTo('', 'core/img/filetypes/image.png'), + 'icon' => OC_Helper::imagePath('core', 'places/picture.svg'), 'name' => 'Gallery')); class OC_GallerySearchProvider extends OC_Search_Provider{ @@ -17,7 +17,7 @@ OC_App::addNavigationEntry( array( $result = $stmt->execute(array(OC_User::getUser(),'%'.$query.'%')); $results=array(); while($row=$result->fetchRow()){ - $results[]=new OC_Search_Result($row['album_name'],'',OC_Helper::linkTo( 'apps/gallery', 'index.php?view='.$row['album_name']),'Galleries'); + $results[]=new OC_Search_Result($row['album_name'],'',OC_Helper::linkTo('apps/gallery', 'index.php?view='.$row['album_name']),'Galleries'); } return $results; } diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php index dd1a830a94b..475a33500f4 100644 --- a/apps/media/appinfo/app.php +++ b/apps/media/appinfo/app.php @@ -29,5 +29,5 @@ OC_APP::registerPersonal('media','settings'); OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' )); -OC_App::addNavigationEntry( array( 'id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo( 'media', 'index.php' ), 'icon' => OC_Helper::imagePath( 'core', 'filetypes/audio.svg' ), 'name' => $l->t('Music') )); +OC_App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo('media', 'index.php'), 'icon' => OC_Helper::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music'))); ?> diff --git a/core/img/filetypes/addressbook.png b/core/img/filetypes/addressbook.png deleted file mode 100644 index b73419ba820..00000000000 Binary files a/core/img/filetypes/addressbook.png and /dev/null differ diff --git a/core/img/filetypes/file.png b/core/img/filetypes/file.png new file mode 100644 index 00000000000..8b8b1ca0000 Binary files /dev/null and b/core/img/filetypes/file.png differ diff --git a/core/img/filetypes/presentation.png b/core/img/filetypes/presentation.png index c4eff0387d5..b4aaad9a45c 100644 Binary files a/core/img/filetypes/presentation.png and b/core/img/filetypes/presentation.png differ diff --git a/core/img/places/image.png b/core/img/places/image.png deleted file mode 100644 index 980a7c69813..00000000000 Binary files a/core/img/places/image.png and /dev/null differ diff --git a/core/img/places/image.svg b/core/img/places/image.svg deleted file mode 100644 index 26c3d6312c2..00000000000 --- a/core/img/places/image.svg +++ /dev/null @@ -1,1697 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/img/places/picture.png b/core/img/places/picture.png new file mode 100644 index 00000000000..980a7c69813 Binary files /dev/null and b/core/img/places/picture.png differ diff --git a/core/img/places/picture.svg b/core/img/places/picture.svg new file mode 100644 index 00000000000..26c3d6312c2 --- /dev/null +++ b/core/img/places/picture.svg @@ -0,0 +1,1697 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From ab5e26dd32ad4ca81a8379e911a475a0fc991f8f Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Fri, 7 Oct 2011 16:30:37 +0200 Subject: renamed icons --- core/img/filetypes/audio.png | Bin 0 -> 385 bytes core/img/filetypes/calendar.png | Bin 675 -> 0 bytes core/img/filetypes/document.png | Bin 342 -> 0 bytes core/img/filetypes/feed.png | Bin 691 -> 0 bytes core/img/filetypes/font.png | Bin 0 -> 813 bytes core/img/filetypes/ical.png | Bin 0 -> 675 bytes core/img/filetypes/image.png | Bin 688 -> 606 bytes core/img/filetypes/javascript.png | Bin 859 -> 0 bytes core/img/filetypes/model.png | Bin 0 -> 452 bytes core/img/filetypes/ms-excel.png | Bin 0 -> 566 bytes core/img/filetypes/ms-powerpoint.png | Bin 0 -> 519 bytes core/img/filetypes/msword.png | Bin 0 -> 342 bytes core/img/filetypes/music.png | Bin 385 -> 0 bytes core/img/filetypes/other.png | Bin 555 -> 0 bytes core/img/filetypes/photo.png | Bin 606 -> 0 bytes core/img/filetypes/rss.png | Bin 0 -> 691 bytes core/img/filetypes/script.png | Bin 0 -> 859 bytes core/img/filetypes/svg.png | Bin 0 -> 481 bytes core/img/filetypes/text.png | Bin 0 -> 342 bytes core/img/filetypes/typeface.png | Bin 813 -> 0 bytes core/img/filetypes/vcard.png | Bin 533 -> 0 bytes core/img/filetypes/vcf.png | Bin 0 -> 533 bytes core/img/filetypes/vector.png | Bin 481 -> 0 bytes core/img/filetypes/x-.png | Bin 0 -> 555 bytes 24 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/img/filetypes/audio.png delete mode 100644 core/img/filetypes/calendar.png delete mode 100644 core/img/filetypes/document.png delete mode 100644 core/img/filetypes/feed.png create mode 100644 core/img/filetypes/font.png create mode 100644 core/img/filetypes/ical.png delete mode 100644 core/img/filetypes/javascript.png create mode 100644 core/img/filetypes/model.png create mode 100644 core/img/filetypes/ms-excel.png create mode 100644 core/img/filetypes/ms-powerpoint.png create mode 100644 core/img/filetypes/msword.png delete mode 100644 core/img/filetypes/music.png delete mode 100644 core/img/filetypes/other.png delete mode 100644 core/img/filetypes/photo.png create mode 100644 core/img/filetypes/rss.png create mode 100644 core/img/filetypes/script.png create mode 100644 core/img/filetypes/svg.png create mode 100644 core/img/filetypes/text.png delete mode 100644 core/img/filetypes/typeface.png delete mode 100644 core/img/filetypes/vcard.png create mode 100644 core/img/filetypes/vcf.png delete mode 100644 core/img/filetypes/vector.png create mode 100644 core/img/filetypes/x-.png diff --git a/core/img/filetypes/audio.png b/core/img/filetypes/audio.png new file mode 100644 index 00000000000..a8b3ede3df9 Binary files /dev/null and b/core/img/filetypes/audio.png differ diff --git a/core/img/filetypes/calendar.png b/core/img/filetypes/calendar.png deleted file mode 100644 index 658913852d6..00000000000 Binary files a/core/img/filetypes/calendar.png and /dev/null differ diff --git a/core/img/filetypes/document.png b/core/img/filetypes/document.png deleted file mode 100644 index 813f712f726..00000000000 Binary files a/core/img/filetypes/document.png and /dev/null differ diff --git a/core/img/filetypes/feed.png b/core/img/filetypes/feed.png deleted file mode 100644 index 315c4f4fa62..00000000000 Binary files a/core/img/filetypes/feed.png and /dev/null differ diff --git a/core/img/filetypes/font.png b/core/img/filetypes/font.png new file mode 100644 index 00000000000..81e41de7d3a Binary files /dev/null and b/core/img/filetypes/font.png differ diff --git a/core/img/filetypes/ical.png b/core/img/filetypes/ical.png new file mode 100644 index 00000000000..658913852d6 Binary files /dev/null and b/core/img/filetypes/ical.png differ diff --git a/core/img/filetypes/image.png b/core/img/filetypes/image.png index 23a37b891c2..4a158fef7e0 100644 Binary files a/core/img/filetypes/image.png and b/core/img/filetypes/image.png differ diff --git a/core/img/filetypes/javascript.png b/core/img/filetypes/javascript.png deleted file mode 100644 index 63fe6ceff5b..00000000000 Binary files a/core/img/filetypes/javascript.png and /dev/null differ diff --git a/core/img/filetypes/model.png b/core/img/filetypes/model.png new file mode 100644 index 00000000000..7851cf34c94 Binary files /dev/null and b/core/img/filetypes/model.png differ diff --git a/core/img/filetypes/ms-excel.png b/core/img/filetypes/ms-excel.png new file mode 100644 index 00000000000..abcd93689a0 Binary files /dev/null and b/core/img/filetypes/ms-excel.png differ diff --git a/core/img/filetypes/ms-powerpoint.png b/core/img/filetypes/ms-powerpoint.png new file mode 100644 index 00000000000..b4aaad9a45c Binary files /dev/null and b/core/img/filetypes/ms-powerpoint.png differ diff --git a/core/img/filetypes/msword.png b/core/img/filetypes/msword.png new file mode 100644 index 00000000000..813f712f726 Binary files /dev/null and b/core/img/filetypes/msword.png differ diff --git a/core/img/filetypes/music.png b/core/img/filetypes/music.png deleted file mode 100644 index a8b3ede3df9..00000000000 Binary files a/core/img/filetypes/music.png and /dev/null differ diff --git a/core/img/filetypes/other.png b/core/img/filetypes/other.png deleted file mode 100644 index 8443c23eb94..00000000000 Binary files a/core/img/filetypes/other.png and /dev/null differ diff --git a/core/img/filetypes/photo.png b/core/img/filetypes/photo.png deleted file mode 100644 index 4a158fef7e0..00000000000 Binary files a/core/img/filetypes/photo.png and /dev/null differ diff --git a/core/img/filetypes/rss.png b/core/img/filetypes/rss.png new file mode 100644 index 00000000000..315c4f4fa62 Binary files /dev/null and b/core/img/filetypes/rss.png differ diff --git a/core/img/filetypes/script.png b/core/img/filetypes/script.png new file mode 100644 index 00000000000..63fe6ceff5b Binary files /dev/null and b/core/img/filetypes/script.png differ diff --git a/core/img/filetypes/svg.png b/core/img/filetypes/svg.png new file mode 100644 index 00000000000..a1291c2dfad Binary files /dev/null and b/core/img/filetypes/svg.png differ diff --git a/core/img/filetypes/text.png b/core/img/filetypes/text.png new file mode 100644 index 00000000000..813f712f726 Binary files /dev/null and b/core/img/filetypes/text.png differ diff --git a/core/img/filetypes/typeface.png b/core/img/filetypes/typeface.png deleted file mode 100644 index 81e41de7d3a..00000000000 Binary files a/core/img/filetypes/typeface.png and /dev/null differ diff --git a/core/img/filetypes/vcard.png b/core/img/filetypes/vcard.png deleted file mode 100644 index c02f315d207..00000000000 Binary files a/core/img/filetypes/vcard.png and /dev/null differ diff --git a/core/img/filetypes/vcf.png b/core/img/filetypes/vcf.png new file mode 100644 index 00000000000..c02f315d207 Binary files /dev/null and b/core/img/filetypes/vcf.png differ diff --git a/core/img/filetypes/vector.png b/core/img/filetypes/vector.png deleted file mode 100644 index a1291c2dfad..00000000000 Binary files a/core/img/filetypes/vector.png and /dev/null differ diff --git a/core/img/filetypes/x-.png b/core/img/filetypes/x-.png new file mode 100644 index 00000000000..8443c23eb94 Binary files /dev/null and b/core/img/filetypes/x-.png differ -- cgit v1.2.3 From 6449a45695221aeba5f8510a707a8fb14b1d7bc3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 7 Oct 2011 17:02:55 +0200 Subject: disable openid on default --- apps/user_openid/appinfo/info.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/user_openid/appinfo/info.xml b/apps/user_openid/appinfo/info.xml index 332d2199dd3..37be15abfda 100644 --- a/apps/user_openid/appinfo/info.xml +++ b/apps/user_openid/appinfo/info.xml @@ -7,5 +7,4 @@ AGPL Robin Appelman 2 - -- cgit v1.2.3 From 1f562a2e83f106a637e402afae1697cf2936295a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 7 Oct 2011 18:09:49 +0200 Subject: fixes for the mimetype icons --- core/img/filetypes/application-pdf.png | Bin 0 -> 591 bytes core/img/filetypes/application-rss+xml.png | Bin 0 -> 691 bytes core/img/filetypes/c.png | Bin 587 -> 0 bytes core/img/filetypes/cplusplus.png | Bin 621 -> 0 bytes core/img/filetypes/csharp.png | Bin 700 -> 0 bytes core/img/filetypes/css.png | Bin 524 -> 0 bytes core/img/filetypes/h.png | Bin 603 -> 0 bytes core/img/filetypes/html.png | Bin 578 -> 0 bytes core/img/filetypes/ical.png | Bin 675 -> 0 bytes core/img/filetypes/image-svg+xml.png | Bin 0 -> 481 bytes core/img/filetypes/msword.png | Bin 342 -> 0 bytes core/img/filetypes/pdf.png | Bin 591 -> 0 bytes core/img/filetypes/rss.png | Bin 691 -> 0 bytes core/img/filetypes/svg.png | Bin 481 -> 0 bytes core/img/filetypes/text-calendar.png | Bin 0 -> 675 bytes core/img/filetypes/text-css.png | Bin 0 -> 524 bytes core/img/filetypes/text-html.png | Bin 0 -> 578 bytes core/img/filetypes/text-x-c++.png | Bin 0 -> 621 bytes core/img/filetypes/text-x-c.png | Bin 0 -> 587 bytes core/img/filetypes/text-x-csharp.png | Bin 0 -> 700 bytes core/img/filetypes/text-x-h.png | Bin 0 -> 603 bytes files/js/filelist.js | 2 +- lib/helper.php | 12 ++++++------ 23 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 core/img/filetypes/application-pdf.png create mode 100644 core/img/filetypes/application-rss+xml.png delete mode 100644 core/img/filetypes/c.png delete mode 100644 core/img/filetypes/cplusplus.png delete mode 100644 core/img/filetypes/csharp.png delete mode 100644 core/img/filetypes/css.png delete mode 100644 core/img/filetypes/h.png delete mode 100644 core/img/filetypes/html.png delete mode 100644 core/img/filetypes/ical.png create mode 100644 core/img/filetypes/image-svg+xml.png delete mode 100644 core/img/filetypes/msword.png delete mode 100644 core/img/filetypes/pdf.png delete mode 100644 core/img/filetypes/rss.png delete mode 100644 core/img/filetypes/svg.png create mode 100644 core/img/filetypes/text-calendar.png create mode 100644 core/img/filetypes/text-css.png create mode 100644 core/img/filetypes/text-html.png create mode 100644 core/img/filetypes/text-x-c++.png create mode 100644 core/img/filetypes/text-x-c.png create mode 100644 core/img/filetypes/text-x-csharp.png create mode 100644 core/img/filetypes/text-x-h.png diff --git a/core/img/filetypes/application-pdf.png b/core/img/filetypes/application-pdf.png new file mode 100644 index 00000000000..8f8095e46fa Binary files /dev/null and b/core/img/filetypes/application-pdf.png differ diff --git a/core/img/filetypes/application-rss+xml.png b/core/img/filetypes/application-rss+xml.png new file mode 100644 index 00000000000..315c4f4fa62 Binary files /dev/null and b/core/img/filetypes/application-rss+xml.png differ diff --git a/core/img/filetypes/c.png b/core/img/filetypes/c.png deleted file mode 100644 index 34a05cccf06..00000000000 Binary files a/core/img/filetypes/c.png and /dev/null differ diff --git a/core/img/filetypes/cplusplus.png b/core/img/filetypes/cplusplus.png deleted file mode 100644 index a87cf847cb7..00000000000 Binary files a/core/img/filetypes/cplusplus.png and /dev/null differ diff --git a/core/img/filetypes/csharp.png b/core/img/filetypes/csharp.png deleted file mode 100644 index ffb8fc932f3..00000000000 Binary files a/core/img/filetypes/csharp.png and /dev/null differ diff --git a/core/img/filetypes/css.png b/core/img/filetypes/css.png deleted file mode 100644 index 23f3101811f..00000000000 Binary files a/core/img/filetypes/css.png and /dev/null differ diff --git a/core/img/filetypes/h.png b/core/img/filetypes/h.png deleted file mode 100644 index e902abb0767..00000000000 Binary files a/core/img/filetypes/h.png and /dev/null differ diff --git a/core/img/filetypes/html.png b/core/img/filetypes/html.png deleted file mode 100644 index 55d1072eafd..00000000000 Binary files a/core/img/filetypes/html.png and /dev/null differ diff --git a/core/img/filetypes/ical.png b/core/img/filetypes/ical.png deleted file mode 100644 index 658913852d6..00000000000 Binary files a/core/img/filetypes/ical.png and /dev/null differ diff --git a/core/img/filetypes/image-svg+xml.png b/core/img/filetypes/image-svg+xml.png new file mode 100644 index 00000000000..a1291c2dfad Binary files /dev/null and b/core/img/filetypes/image-svg+xml.png differ diff --git a/core/img/filetypes/msword.png b/core/img/filetypes/msword.png deleted file mode 100644 index 813f712f726..00000000000 Binary files a/core/img/filetypes/msword.png and /dev/null differ diff --git a/core/img/filetypes/pdf.png b/core/img/filetypes/pdf.png deleted file mode 100644 index 8f8095e46fa..00000000000 Binary files a/core/img/filetypes/pdf.png and /dev/null differ diff --git a/core/img/filetypes/rss.png b/core/img/filetypes/rss.png deleted file mode 100644 index 315c4f4fa62..00000000000 Binary files a/core/img/filetypes/rss.png and /dev/null differ diff --git a/core/img/filetypes/svg.png b/core/img/filetypes/svg.png deleted file mode 100644 index a1291c2dfad..00000000000 Binary files a/core/img/filetypes/svg.png and /dev/null differ diff --git a/core/img/filetypes/text-calendar.png b/core/img/filetypes/text-calendar.png new file mode 100644 index 00000000000..658913852d6 Binary files /dev/null and b/core/img/filetypes/text-calendar.png differ diff --git a/core/img/filetypes/text-css.png b/core/img/filetypes/text-css.png new file mode 100644 index 00000000000..23f3101811f Binary files /dev/null and b/core/img/filetypes/text-css.png differ diff --git a/core/img/filetypes/text-html.png b/core/img/filetypes/text-html.png new file mode 100644 index 00000000000..55d1072eafd Binary files /dev/null and b/core/img/filetypes/text-html.png differ diff --git a/core/img/filetypes/text-x-c++.png b/core/img/filetypes/text-x-c++.png new file mode 100644 index 00000000000..a87cf847cb7 Binary files /dev/null and b/core/img/filetypes/text-x-c++.png differ diff --git a/core/img/filetypes/text-x-c.png b/core/img/filetypes/text-x-c.png new file mode 100644 index 00000000000..34a05cccf06 Binary files /dev/null and b/core/img/filetypes/text-x-c.png differ diff --git a/core/img/filetypes/text-x-csharp.png b/core/img/filetypes/text-x-csharp.png new file mode 100644 index 00000000000..ffb8fc932f3 Binary files /dev/null and b/core/img/filetypes/text-x-csharp.png differ diff --git a/core/img/filetypes/text-x-h.png b/core/img/filetypes/text-x-h.png new file mode 100644 index 00000000000..e902abb0767 Binary files /dev/null and b/core/img/filetypes/text-x-h.png differ diff --git a/files/js/filelist.js b/files/js/filelist.js index 66092220795..84762bb561d 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -3,7 +3,7 @@ FileList={ $('#fileList').empty().html(fileListHtml); }, addFile:function(name,size,lastModified,loading){ - var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file'); + var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file.png'); var html=''; if(name.indexOf('.')!=-1){ var basename=name.substr(0,name.lastIndexOf('.')); diff --git a/lib/helper.php b/lib/helper.php index 9c2b5fc33ce..c2a81ba3306 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -101,20 +101,20 @@ class OC_Helper { // Is it a dir? if( $mimetype == "dir" ){ - return OC::$WEBROOT."/core/img/places/folder.svg"; + return OC::$WEBROOT."/core/img/filetypes/folder.png"; } // Icon exists? - if( file_exists( OC::$SERVERROOT."/core/img/filetypes/$mimetype.svg" )){ - return OC::$WEBROOT."/core/img/filetypes/$mimetype.svg"; + if( file_exists( OC::$SERVERROOT."/core/img/filetypes/$mimetype.png" )){ + return OC::$WEBROOT."/core/img/filetypes/$mimetype.png"; } //try only the first part of the filetype $mimetype=substr($mimetype,0,strpos($mimetype,'-')); - if( file_exists( OC::$SERVERROOT."/core/img/filetypes/$mimetype.svg" )){ - return OC::$WEBROOT."/core/img/filetypes/$mimetype.svg"; + if( file_exists( OC::$SERVERROOT."/core/img/filetypes/$mimetype.png" )){ + return OC::$WEBROOT."/core/img/filetypes/$mimetype.png"; } else{ - return OC::$WEBROOT."/core/img/filetypes/file.svg"; + return OC::$WEBROOT."/core/img/filetypes/file.png"; } } -- cgit v1.2.3 From 7e0da0cb253f472e17253579730fbbee67bcf643 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 7 Oct 2011 18:13:46 +0200 Subject: fix amapache url --- apps/media/templates/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/media/templates/settings.php b/apps/media/templates/settings.php index da9346166e4..ac813c20850 100644 --- a/apps/media/templates/settings.php +++ b/apps/media/templates/settings.php @@ -2,6 +2,6 @@
Media
Ampache address: -
+
-- cgit v1.2.3 From bc54f136364b20a0ea8cb1ed95802646daa2f81e Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 7 Oct 2011 21:59:18 +0200 Subject: Fix name when adding contact --- apps/contacts/ajax/addcard.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/contacts/ajax/addcard.php b/apps/contacts/ajax/addcard.php index ee95513732d..70e0f0a89d0 100644 --- a/apps/contacts/ajax/addcard.php +++ b/apps/contacts/ajax/addcard.php @@ -44,9 +44,10 @@ $vcard->add(new Sabre_VObject_Property('UID',OC_Contacts_VCard::createUID())); $id = OC_Contacts_VCard::add($aid,$vcard->serialize()); $details = OC_Contacts_VCard::structureContact($vcard); +$name = $details['FN'][0]['value']; $tmpl = new OC_Template('contacts','part.details'); $tmpl->assign('details',$details); $tmpl->assign('id',$id); $page = $tmpl->fetchPage(); -OC_JSON::success(array('data' => array( 'id' => $id, 'page' => $page ))); +OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page ))); -- cgit v1.2.3 From 8ea9c39241954228a216415d6d0e6859243c7360 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 7 Oct 2011 22:25:26 +0200 Subject: Fix saving properties with a new contact --- apps/contacts/ajax/addcard.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/contacts/ajax/addcard.php b/apps/contacts/ajax/addcard.php index 70e0f0a89d0..e7b56a7bf00 100644 --- a/apps/contacts/ajax/addcard.php +++ b/apps/contacts/ajax/addcard.php @@ -37,10 +37,21 @@ if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ } $fn = $_POST['fn']; +$values = $_POST['value']; +$parameters = $_POST['parameters']; $vcard = new Sabre_VObject_Component('VCARD'); $vcard->add(new Sabre_VObject_Property('FN',$fn)); $vcard->add(new Sabre_VObject_Property('UID',OC_Contacts_VCard::createUID())); +foreach(array('ADR', 'TEL', 'EMAIL', 'ORG') as $propname){ + $value = $values[$propname]; + if (isset($parameters[$propname])){ + $prop_parameters = $parameters[$propname]; + } else { + $prop_parameters = array(); + } + OC_Contacts_VCard::addVCardProperty($vcard, $propname, $value, $prop_parameters); +} $id = OC_Contacts_VCard::add($aid,$vcard->serialize()); $details = OC_Contacts_VCard::structureContact($vcard); -- cgit v1.2.3 From f95e8c62c90d2a97d6f50ff7b1792f9d700548f8 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 7 Oct 2011 22:38:19 +0200 Subject: Save the right contact property --- apps/contacts/js/interface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js index 47e9bb10b1f..215c4001d9e 100644 --- a/apps/contacts/js/interface.js +++ b/apps/contacts/js/interface.js @@ -129,7 +129,7 @@ $(document).ready(function(){ }); $('#contacts_setpropertyform input[type="submit"]').live('click',function(){ - $.post('ajax/setproperty.php',$('#contacts_setpropertyform').serialize(),function(jsondata){ + $.post('ajax/setproperty.php',$(this).parent('form').serialize(),function(jsondata){ if(jsondata.status == 'success'){ $('.contacts_details_property[data-checksum="'+jsondata.data.oldchecksum+'"]').replaceWith(jsondata.data.page); } -- cgit v1.2.3 From 46b8703b715230122a14548a229fc648077ca0fe Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 7 Oct 2011 22:42:50 +0200 Subject: Display contact name without label and in bold --- apps/contacts/templates/part.property.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/contacts/templates/part.property.php b/apps/contacts/templates/part.property.php index 3469f53b0da..31fb187a0d3 100644 --- a/apps/contacts/templates/part.property.php +++ b/apps/contacts/templates/part.property.php @@ -1,8 +1,8 @@ - t('Name'); ?> + - + -- cgit v1.2.3 From a13d42fdaf5751afc42dff3770c6f9eb27a0a8ed Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 7 Oct 2011 23:01:44 +0200 Subject: Fixes for adding contact property --- apps/contacts/ajax/addproperty.php | 2 +- apps/contacts/js/interface.js | 2 +- apps/contacts/lib/vcard.php | 1 + apps/contacts/templates/part.details.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php index 68c4f65fa5c..101cfabbe84 100644 --- a/apps/contacts/ajax/addproperty.php +++ b/apps/contacts/ajax/addproperty.php @@ -53,7 +53,7 @@ $name = $_POST['name']; $value = $_POST['value']; $parameters = isset($_POST['parameteres'])?$_POST['parameters']:array(); -OC_Contacts_VCard::addVCardProperty($vcard, $name, $value, $parameters); +$property = OC_Contacts_VCard::addVCardProperty($vcard, $name, $value, $parameters); $line = count($vcard->children) - 1; $checksum = md5($property->serialize()); diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js index 215c4001d9e..0fcfdeaab5d 100644 --- a/apps/contacts/js/interface.js +++ b/apps/contacts/js/interface.js @@ -75,7 +75,7 @@ $(document).ready(function(){ $('#contacts_addpropertyform input[type="submit"]').live('click',function(){ $.post('ajax/addproperty.php',$('#contacts_addpropertyform').serialize(),function(jsondata){ if(jsondata.status == 'success'){ - $('#contacts_cardoptions').before(jsondata.data.page); + $('#contacts_details').append(jsondata.data.page); $('#contacts_addpropertyform').remove(); $('#contacts_addcontactsparts').remove(); } diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index bff2897384f..9f15cf4bc37 100644 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -290,6 +290,7 @@ class OC_Contacts_VCard{ } $vcard->add($property); + return $property; } /** diff --git a/apps/contacts/templates/part.details.php b/apps/contacts/templates/part.details.php index 254d54a4e8e..26a33739acb 100644 --- a/apps/contacts/templates/part.details.php +++ b/apps/contacts/templates/part.details.php @@ -1,5 +1,5 @@ - +
-- cgit v1.2.3 From 0bb32705038f99591a40fee684eb598a21735c46 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 8 Oct 2011 00:12:57 +0200 Subject: Revert "support of RRULE in calendar app" Reverting as per Georg's request (not stable enough yet) This reverts commit 55ab68a3326f6900faac3bf1779346013e6bac9a. --- apps/calendar/ajax/getcal.php | 699 ++---------------------------------------- 1 file changed, 34 insertions(+), 665 deletions(-) diff --git a/apps/calendar/ajax/getcal.php b/apps/calendar/ajax/getcal.php index 3d43677075f..a65c6cf2602 100644 --- a/apps/calendar/ajax/getcal.php +++ b/apps/calendar/ajax/getcal.php @@ -28,674 +28,43 @@ $select_year = $_GET["year"]; $user_timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London"); foreach($events as $event) { - if($select_year != substr($event['startdate'], 0, 4) && $event["repeating"] == false) + if ($select_year != substr($event['startdate'], 0, 4)) continue; - if($select_year == substr($event['startdate'], 0, 4) && $event["repeating"] == false){ - $object = Sabre_VObject_Reader::read($event['calendardata']); - $vevent = $object->VEVENT; - $dtstart = $vevent->DTSTART; - $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); - $start_dt = $dtstart->getDateTime(); - $start_dt->setTimezone(new DateTimeZone($user_timezone)); - $end_dt = $dtend->getDateTime(); - $end_dt->setTimezone(new DateTimeZone($user_timezone)); - $year = $start_dt->format('Y'); - $month = $start_dt->format('n') - 1; // return is 0 based - $day = $start_dt->format('j'); - $hour = $start_dt->format('G'); - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } + $object = Sabre_VObject_Reader::read($event['calendardata']); + $vevent = $object->VEVENT; + $dtstart = $vevent->DTSTART; + $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); + $start_dt = $dtstart->getDateTime(); + $start_dt->setTimezone(new DateTimeZone($user_timezone)); + $end_dt = $dtend->getDateTime(); + $end_dt->setTimezone(new DateTimeZone($user_timezone)); + $year = $start_dt->format('Y'); + $month = $start_dt->format('n') - 1; // return is 0 based + $day = $start_dt->format('j'); + $hour = $start_dt->format('G'); + if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { + $hour = 'allday'; + } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop) - { - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - if ($hour == 'allday') - { - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])) - { - $return[$year][$month][$day][$hour][] = $return_event; - } - else - { - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } + $return_event = array(); + foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop) + { + $return_event[$prop] = $event[$prop]; + } + $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); + $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); + $return_event['description'] = $event['summary']; + if ($hour == 'allday') + { + $return_event['allday'] = true; + } + if (isset($return[$year][$month][$day][$hour])) + { + $return[$year][$month][$day][$hour][] = $return_event; } - if($event["repeating"] == 1){ - $object = Sabre_VObject_Reader::read($event['calendardata']); - $vevent = $object->VEVENT; - //echo substr_count($event["calendardata"], "EXDATE"); - $numofelements = substr_count($vevent->RRULE, ";"); - $properties = array("FREQ"=>"false", "UNTIL"=>"false", "COUNT"=>"false", "INTERVAL"=>"false", "BYDAY"=>"false", "BYMONTHDAY"=>"false", "BYWEEKNO"=>"false", "BYMONTH"=>"false", "BYYEARDAY"=>"false", "BYSETPOS"=>"false"); - $exruleproperties = array("FREQ"=>"false", "UNTIL"=>"false", "COUNT"=>"false", "INTERVAL"=>"false", "BYDAY"=>"false", "BYMONTHDAY"=>"false", "BYWEEKNO"=>"false", "BYMONTH"=>"false", "BYYEARDAY"=>"false", "BYSETPOS"=>"false"); - $byday = array("MO"=>"false", "TU"=>"false", "WE"=>"false", "TH"=>"false", "FR"=>"false", "SA"=>"false", "SU"=>"false"); - if($numofelements != 0){ - $rrule = explode(";", $vevent->RRULE); - for($i = 0;$i <= $numofelements;$i++){ - $rule = explode("=", $rrule[$i]); - $property = $rule[0]; - $value = $rule[1]; - $properties[$property] = $value; - } - if($properties["BYDAY"] != "false"){ - $numofdays = substr_count($properties["BYDAY"], ","); - if($numofdays == 0){ - if(strlen($properties["BYDAY"]) != 2){ - $lenght = strlen($properties["BYDAY"]); - switch($lenght){ - case "3": - $properties["BYSETPOS"] = substr($properties["BYDAY"],0,1); - $properties["BYDAY"] = substr($properties["BYDAY"],1,2); - break; - case "4": - $properties["BYSETPOS"] = substr($properties["BYDAY"],0,2); - $properties["BYDAY"] = substr($properties["BYDAY"],2,2); - break; - case "5": - $properties["BYSETPOS"] = substr($properties["BYDAY"],0,3); - $properties["BYDAY"] = substr($properties["BYDAY"],3,2); - break; - case "6": - $properties["BYSETPOS"] = substr($properties["BYDAY"],0,4); - $properties["BYDAY"] = substr($properties["BYDAY"],4,2); - break; - } - } - $byday[$properties["BYDAY"]] = true; - - }else{ - $days = explode(",", $properties["BYDAY"]); - for($i = 0;$i <= $numofdays;$i++){ - $day = $days[$i]; - $byday[$day] = true; - } - } - } - }else{ - $rule = explode("=", $vevent->RRULE); - $properties[$rule[0]] = $rule[1]; - } - if($properties["INTERVAL"] == "false"){ - $properties["INTERVAL"] = 1; - } - $count = 0; //counts all loops - $countedoutputs = 0; //counts only the outputs - $countchecker = true; - $dtstart = $vevent->DTSTART; - $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); - $start_dt = $dtstart->getDateTime(); - $start_dt->setTimezone(new DateTimeZone($user_timezone)); - $end_dt = $dtend->getDateTime(); - $end_dt->setTimezone(new DateTimeZone($user_timezone)); - $firststart_year = $start_dt->format('Y'); - $firststart_month = $start_dt->format('n'); - $firststart_day = $start_dt->format('j'); - $hour = $start_dt->format('G'); - $interval = 0; - if($properties["UNTIL"] != "false"){ - $until = $properties["UNTIL"]; - $until_year = substr($until, 0, 4); - $until_month = substr($until, 4, 2); - $until_day = substr($until, 6, 2); - } - //print_r($properties); - //print_r($byday); - if($properties["FREQ"] == "DAILY"){ - if($properties["BYDAY"] == "false"){ - $byday = array("MO"=>"1", "TU"=>"1", "WE"=>"1", "TH"=>"1", "FR"=>"1", "SA"=>"1", "SU"=>"1"); - } - while(date("Y", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)) <= $select_year && $countchecker == true){ - if($byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)), 0, 2))] == "1"){ - $newunixtime = mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - } - $count++; - } - } - if($properties["FREQ"] == "WEEKLY"){ - if($properties["BYDAY"] == "false"){ - $byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year)), 0, 2))] = "1"; - } - while(date("Y", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)) <= $select_year && $countchecker == true){ - if($byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval)), 0, 2))] == "1"){ - $newunixtime = mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year) + ($count * 1 * 86400 * $interval); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - } - $count++; - } - } - if($properties["FREQ"] == "MONTHLY"){ - if(substr_count($properties["BYMONTHDAY"], ",") != 0){ - $numofBYMONTHDAY = substr_count($properties["BYMONTHDAY"], ","); - if($numofBYMONTHDAY == 0){ - $BYMONTHDAY = array(); - $BYMONTHDAY[0] = $properties["BYMONTHDAY"]; - }else{ - $BYMONTHDAY = explode(",", $properties["BYMONTHDAY"]); - } - while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $properties["BYMONTHDAY"], $firststart_year)) <= $select_year && $countchecker == true){ - for($i = 0;$i <= $numofBYMONTHDAY;$i++){ - $newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $BYMONTHDAY[$i], $firststart_year); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - } - $count++; - } - } - //if($properties["BYMONTHDAY"] != "false"){ - if($properties["BYSETPOS"] == "false"){ - while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $properties["BYMONTHDAY"], $firststart_year)) <= $select_year && $countchecker == true){ - $newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $properties["BYMONTHDAY"], $firststart_year); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - }else{ - if(!is_nan($properties["BYSETPOS"]) && $properties["BYSETPOS"] >= 1){ - while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)) <= $select_year && $countchecker == true){ - $lastdayofmonth = date("t", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)); - $matches = 0; - $matchedday = ""; - for($i = 1;$i <= $lastdayofmonth;$i++){ - $thisday = date("j", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year)); - $thisdayname = strtoupper(substr(date("D", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year)),0,2)); - //echo $thisdayname . " " . $thisday . "\n"; - if($byday[$thisdayname] == 1){ - $matches++; - } - if($matches == $properties["BYSETPOS"]){ - $matchedday = $thisday; - $i = 32; - } - } - $newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = $matchedday; - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - }elseif(!is_nan($properties["BYSETPOS"]) && $properties["BYSETPOS"] <= -1){ - while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)) <= $select_year && $countchecker == true){ - $lastdayofmonth = date("t", mktime(0,0,0, $firststart_month + ($count * $interval), 1, $firststart_year)); - $matches = 0; - $matchedday = ""; - for($i = $lastdayofmonth;$i >= 1;$i--){ - $thisday = date("j", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year)); - $thisdayname = strtoupper(substr(date("D", mktime(0,0,0, $firststart_month + ($count * $interval), $i, $firststart_year)),0,2)); - //echo $thisdayname . " " . $thisday . "\n"; - if($byday[$thisdayname] == 1){ - $matches++; - } - if($matches == $properties["BYSETPOS"]){ - $matchedday = $thisday; - $i = 0; - } - } - $newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = $matchedday; - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - //} - } - } - if(strlen($properties["BYDAY"]) == 2){ - while(date("Y", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)) <= $select_year && $countchecker == true){ - if($byday[strtoupper(substr(date("D", mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year)), 0, 2))] == "1"){ - $newunixtime = mktime(0,0,0, $firststart_month + ($count * $interval), $firststart_day, $firststart_year); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - } - $count++; - } - }else{ - while(date("Y", mktime(0,0,0, 0, 0, $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){ - $newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval)); - $year = date("Y", $newunixtime); - $month = $month - 1; // return is 0 based - $day = $dateofweekone; - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - } - } - if($properties["FREQ"] == "YEARLY"){ - if($properties["BYMONTH"] != "false"){ - if($properties["BYMONTHDAY"] == false){ - $properties["BYMONTHDAY"] = date("j", mktime(0,0,0, $firststart_month, $firststart_day, $firststart_year)); - } - if($properties["BYDAY"] == "false"){ - while(date("Y", mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){ - $newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval)); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - } - if(strlen($properties["BYDAY"]) == 2){ - while(date("Y", mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){ - $newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval)); - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - }else{ - $number = substr($properties["BYDAY"],0,1); - $weekday = substr($properties["BYDAY"],1,2); - $month = $properties["BYMONTH"]; - $dateofweekone = ""; - for($i = 0; $i <= 7;$i++){ - if(strtoupper(substr(date("D", mktime(0,0,0, $properties["BYMONTH"], $i, $select_year)), 0, 2)) == $weekday){ - $dateofweekone = date("j", mktime(0,0,0, $properties["BYMONTH"], $i, $select_year)); - $i = 8; - } - } - if($number != 1){ - $dateofweekone = $dateofweekone + (7 * ($number - 1)); - } - while(date("Y", mktime(0,0,0, 0, 0, $firststart_year + ($count * $interval))) <= $select_year && $countchecker == true){ - $newunixtime = mktime(0,0,0, $properties["BYMONTH"], $properties["BYMONTHDAY"], $firststart_year + ($count * $interval)); - $year = date("Y", $newunixtime); - $month = $month - 1; // return is 0 based - $day = $dateofweekone; - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - $count++; - } - } - }elseif($properties["BYYEARDAY"] != false){ - $numofyeardays = substr_count($properties["BYYEARDAY"], ","); - if($numofyeardays == 0){ - $yeardays = array(); - $yeardays[0] = $properties["BYYEARDAY"]; - }else{ - $yeardays = explode(",", $properties["BYYEARDAY"]); - } - while(date("Y", mktime(0,0,0, 0, 0, $firststart_year + ($count * $interval)) + ($yeardays[$numofyeardays]-1) * 86400) <= $select_year && $countchecker == true){ - for($i = 0;$i <= $numofyeardays;$i++){ - $newunixtime = mktime(0,0,0, 1, 1, $firststart_year + ($count * $interval)) + ($yeardays[$i] -1) * 86400; - $year = date("Y", $newunixtime); - $month = date("n", $newunixtime) - 1; // return is 0 based - $day = date("j", $newunixtime); - if($properties["UNTIL"] != "false"){ - if($year >= $until_year && $month + 1 >= $until_month && $day > $until_day){ - break; - } - } - if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) { - $hour = 'allday'; - } - $return_event = array(); - foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop){ - $return_event[$prop] = $event[$prop]; - } - $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i')); - $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i')); - $return_event['description'] = $event['summary']; - $interval = $properties["INTERVAL"]; - $countedoutputs++; - if($properties["COUNT"] != "false"){ - if($countedoutputs == $properties["COUNT"]){ - $countchecker = false; - } - } - if ($hour == 'allday'){ - $return_event['allday'] = true; - } - if (isset($return[$year][$month][$day][$hour])){ - $return[$year][$month][$day][$hour][] = $return_event; - }else{ - $return[$year][$month][$day][$hour] = array(1 => $return_event); - } - } - $count++; - } - } - } + else + { + $return[$year][$month][$day][$hour] = array(1 => $return_event); } } OC_JSON::encodedPrint($return); -- cgit v1.2.3 From 71caa4a20c6b15300e4367c1b92c8ae650399fc7 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Sat, 8 Oct 2011 10:10:29 +0200 Subject: added code and license links next to version number --- core/templates/layout.guest.php | 2 +- settings/templates/personal.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 96f3d2662fb..e1f8928fc9b 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -32,6 +32,6 @@ -

ownCloud: t( 'web services under your control' ); ?>

+

ownCloudt( 'web services under your control' ); ?>

diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 3c4ad085165..19bd8789125 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -50,8 +50,7 @@ };?>

- ownCloud - + ownCloud , source code licensed freely under AGPL

-- cgit v1.2.3 From 590ff0ced98a27e7b1664896d5205358b1ee3612 Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Sat, 8 Oct 2011 13:10:49 +0200 Subject: moved bookmarklet to personal. username must be provided when adding a new user. --- apps/bookmarks/appinfo/app.php | 25 ++++++------------------- apps/bookmarks/templates/list.php | 12 ++++++++++-- apps/calendar/templates/settings.php | 2 -- settings/js/users.js | 4 ++++ 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/apps/bookmarks/appinfo/app.php b/apps/bookmarks/appinfo/app.php index 33b7ba61449..44a1e47dff9 100644 --- a/apps/bookmarks/appinfo/app.php +++ b/apps/bookmarks/appinfo/app.php @@ -1,27 +1,14 @@ . -* +* Copyright (c) 2011 Marvin Thomas Rabe +* Copyright (c) 2011 Arthur Schiwon +* This file is licensed under the Affero General Public License version 3 or +* later. +* See the COPYING-README file. */ OC_App::register( array( 'order' => 70, 'id' => 'bookmark', 'name' => 'Bookmarks' )); OC_App::addNavigationEntry( array( 'id' => 'bookmarks_index', 'order' => 70, 'href' => OC_Helper::linkTo( 'bookmarks', 'index.php' ), 'icon' => OC_Helper::imagePath( 'bookmarks', 'bookmarks.png' ), 'name' => 'Bookmarks' )); +OC_App::registerPersonal('bookmarks', 'settings'); diff --git a/apps/bookmarks/templates/list.php b/apps/bookmarks/templates/list.php index d73657b36ac..052531f4011 100644 --- a/apps/bookmarks/templates/list.php +++ b/apps/bookmarks/templates/list.php @@ -1,8 +1,16 @@ + + * Copyright (c) 2011 Arthur Schiwon + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +?>

t('Bookmarks with tag: ') . urldecode($_GET["tag"]) : $l->t('All bookmarks'); ?>

diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 4f509283939..56fb55d235c 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -6,8 +6,6 @@ * later. * See the COPYING-README file. */ -OC_UTIL::addScript('', 'jquery.multiselect'); -OC_UTIL::addStyle('', 'jquery.multiselect'); ?>
diff --git a/settings/js/users.js b/settings/js/users.js index 4944f3a62f6..64a132b427e 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -123,6 +123,10 @@ $(document).ready(function(){ $('#newuser').submit(function(event){ event.preventDefault(); var username=$('#newusername').val(); + if(username == '') { + alert('Please provide a username!'); + return false; + } var password=$('#newuserpassword').val(); var groups=$('#newusergroups').prev().children('div').data('settings').checked; $.post( -- cgit v1.2.3 From 39e7db7db4174e4d76c77c47a7b4aab6e3bdda37 Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Sat, 8 Oct 2011 13:11:13 +0200 Subject: added missing files --- apps/bookmarks/settings.php | 13 +++++++++++++ apps/bookmarks/templates/settings.php | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 apps/bookmarks/settings.php create mode 100644 apps/bookmarks/templates/settings.php diff --git a/apps/bookmarks/settings.php b/apps/bookmarks/settings.php new file mode 100644 index 00000000000..8186472dec9 --- /dev/null +++ b/apps/bookmarks/settings.php @@ -0,0 +1,13 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +$tmpl = new OC_Template( 'bookmarks', 'settings'); + +OC_Util::addScript('bookmarks','settings'); + +return $tmpl->fetchPage(); diff --git a/apps/bookmarks/templates/settings.php b/apps/bookmarks/templates/settings.php new file mode 100644 index 00000000000..b7da441c2f8 --- /dev/null +++ b/apps/bookmarks/templates/settings.php @@ -0,0 +1,14 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +?> + +
+ t('Bookmarklet:');?> t('Add page to ownCloud'); ?> +
t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage.'); ?>
+
+ -- cgit v1.2.3 From f3f5d775b519c12e56f4c6db8ca8ccf87c68f19d Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Sat, 8 Oct 2011 13:28:01 +0200 Subject: removed description field for calendar --- apps/calendar/ajax/createcalendar.php | 2 +- apps/calendar/ajax/newcalendar.php | 1 - apps/calendar/ajax/updatecalendar.php | 2 +- apps/calendar/appinfo/database.xml | 6 ------ apps/calendar/import.php | 2 +- apps/calendar/lib/calendar.php | 23 +++++++++-------------- apps/calendar/lib/connector_sabre.php | 6 ++---- apps/calendar/templates/part.editcalendar.php | 6 ------ apps/calendar/templates/part.import.php | 8 +------- 9 files changed, 15 insertions(+), 41 deletions(-) diff --git a/apps/calendar/ajax/createcalendar.php b/apps/calendar/ajax/createcalendar.php index 82176d4368a..3fb2e8398a3 100644 --- a/apps/calendar/ajax/createcalendar.php +++ b/apps/calendar/ajax/createcalendar.php @@ -15,7 +15,7 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); $userid = OC_User::getUser(); -$calendarid = OC_Calendar_Calendar::addCalendar($userid, $_POST['name'], $_POST['description'], 'VEVENT,VTODO,VJOURNAL', null, 0, $_POST['color']); +$calendarid = OC_Calendar_Calendar::addCalendar($userid, $_POST['name'], 'VEVENT,VTODO,VJOURNAL', null, 0, $_POST['color']); OC_Calendar_Calendar::setCalendarActive($calendarid, 1); $calendar = OC_Calendar_Calendar::findCalendar($calendarid); $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields'); diff --git a/apps/calendar/ajax/newcalendar.php b/apps/calendar/ajax/newcalendar.php index e01ae01ee8a..f00dd0fb862 100644 --- a/apps/calendar/ajax/newcalendar.php +++ b/apps/calendar/ajax/newcalendar.php @@ -15,7 +15,6 @@ OC_JSON::checkAppEnabled('calendar'); $calendar = array( 'id' => 'new', 'displayname' => '', - 'description' => '', 'calendarcolor' => '', ); $tmpl = new OC_Template('calendar', 'part.editcalendar'); diff --git a/apps/calendar/ajax/updatecalendar.php b/apps/calendar/ajax/updatecalendar.php index 5cf48d50ea1..a81644ded17 100644 --- a/apps/calendar/ajax/updatecalendar.php +++ b/apps/calendar/ajax/updatecalendar.php @@ -15,7 +15,7 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); $calendarid = $_POST['id']; -OC_Calendar_Calendar::editCalendar($calendarid, $_POST['name'], $_POST['description'], null, null, null, $_POST['color']); +OC_Calendar_Calendar::editCalendar($calendarid, $_POST['name'], null, null, null, $_POST['color']); OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']); $calendar = OC_Calendar_Calendar::findCalendar($calendarid); $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields'); diff --git a/apps/calendar/appinfo/database.xml b/apps/calendar/appinfo/database.xml index bf92179c40b..7f7b6457559 100644 --- a/apps/calendar/appinfo/database.xml +++ b/apps/calendar/appinfo/database.xml @@ -153,12 +153,6 @@ 4 - - description - clob - false - - calendarorder integer diff --git a/apps/calendar/import.php b/apps/calendar/import.php index 46822349448..211791f551b 100644 --- a/apps/calendar/import.php +++ b/apps/calendar/import.php @@ -23,7 +23,7 @@ if($_GET["import"] == "existing"){ $filename = "/" . $_GET["file"]; } }else{ - $id = OC_Calendar_Calendar::addCalendar(OC_User::getUser(), $_POST['calname'], $_POST['description']); + $id = OC_Calendar_Calendar::addCalendar(OC_User::getUser(), $_POST['calname']); OC_Calendar_Calendar::setCalendarActive($id, 1); $calid = $id; if($_POST["path"] != ""){ diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php index 4549af8b3c0..959cb14bf8f 100644 --- a/apps/calendar/lib/calendar.php +++ b/apps/calendar/lib/calendar.php @@ -30,7 +30,6 @@ * uri VARCHAR(100), * active INTEGER UNSIGNED NOT NULL DEFAULT '0', * ctag INTEGER UNSIGNED NOT NULL DEFAULT '0', - * description TEXT, * calendarorder INTEGER UNSIGNED NOT NULL DEFAULT '0', * calendarcolor VARCHAR(10), * timezone TEXT, @@ -94,14 +93,13 @@ class OC_Calendar_Calendar{ * @brief Creates a new calendar * @param string $userid * @param string $name - * @param string $description * @param string $components Default: "VEVENT,VTODO,VJOURNAL" * @param string $timezone Default: null * @param integer $order Default: 1 * @param string $color Default: null * @return insertid */ - public static function addCalendar($userid,$name,$description,$components='VEVENT,VTODO,VJOURNAL',$timezone=null,$order=0,$color=null){ + public static function addCalendar($userid,$name,$components='VEVENT,VTODO,VJOURNAL',$timezone=null,$order=0,$color=null){ $all = self::allCalendars($userid); $uris = array(); foreach($all as $i){ @@ -110,8 +108,8 @@ class OC_Calendar_Calendar{ $uri = self::createURI($name, $uris ); - $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,description,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?,?)' ); - $result = $stmt->execute(array($userid,$name,$uri,1,$description,$order,$color,$timezone,$components)); + $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?)' ); + $result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components)); return OC_DB::insertid(); } @@ -121,18 +119,17 @@ class OC_Calendar_Calendar{ * @param string $principaluri * @param string $uri * @param string $name - * @param string $description * @param string $components * @param string $timezone * @param integer $order * @param string $color * @return insertid */ - public static function addCalendarFromDAVData($principaluri,$uri,$name,$description,$components,$timezone,$order,$color){ + public static function addCalendarFromDAVData($principaluri,$uri,$name,$components,$timezone,$order,$color){ $userid = self::extractUserID($principaluri); - $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,description,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?,?)' ); - $result = $stmt->execute(array($userid,$name,$uri,1,$description,$order,$color,$timezone,$components)); + $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?)' ); + $result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components)); return OC_DB::insertid(); } @@ -141,7 +138,6 @@ class OC_Calendar_Calendar{ * @brief Edits a calendar * @param integer $id * @param string $name Default: null - * @param string $description Default: null * @param string $components Default: null * @param string $timezone Default: null * @param integer $order Default: null @@ -150,20 +146,19 @@ class OC_Calendar_Calendar{ * * Values not null will be set */ - public static function editCalendar($id,$name=null,$description=null,$components=null,$timezone=null,$order=null,$color=null){ + public static function editCalendar($id,$name=null,$components=null,$timezone=null,$order=null,$color=null){ // Need these ones for checking uri $calendar = self::findCalendar($id); // Keep old stuff if(is_null($name)) $name = $calendar['name']; - if(is_null($description)) $description = $calendar['description']; if(is_null($components)) $components = $calendar['components']; if(is_null($timezone)) $timezone = $calendar['timezone']; if(is_null($order)) $order = $calendar['calendarorder']; if(is_null($color)) $color = $calendar['color']; - $stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,description=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' ); - $result = $stmt->execute(array($name,$description,$order,$color,$timezone,$components,$id)); + $stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' ); + $result = $stmt->execute(array($name,$order,$color,$timezone,$components,$id)); return true; } diff --git a/apps/calendar/lib/connector_sabre.php b/apps/calendar/lib/connector_sabre.php index b94e6fb3ae7..13a542fccad 100644 --- a/apps/calendar/lib/connector_sabre.php +++ b/apps/calendar/lib/connector_sabre.php @@ -102,13 +102,12 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract { } if(!isset($newValues['displayname'])) $newValues['displayname'] = 'unnamed'; - if(!isset($newValues['description'])) $newValues['description'] = ''; if(!isset($newValues['components'])) $newValues['components'] = 'VEVENT,VTODO'; if(!isset($newValues['timezone'])) $newValues['timezone'] = null; if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = 0; if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null; - return OC_Calendar_Calendar::addCalendarFromDAVData($principalUri,$calendarUri,$newValues['displayname'],$newValues['description'],$newValues['components'],$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']); + return OC_Calendar_Calendar::addCalendarFromDAVData($principalUri,$calendarUri,$newValues['displayname'],$newValues['components'],$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']); } /** @@ -191,12 +190,11 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract { // Success if(!isset($newValues['displayname'])) $newValues['displayname'] = null; - if(!isset($newValues['description'])) $newValues['description'] = null; if(!isset($newValues['timezone'])) $newValues['timezone'] = null; if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = null; if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null; - OC_Calendar_Calendar::editCalendar($calendarId,$newValues['displayname'],$newValues['description'],null,$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']); + OC_Calendar_Calendar::editCalendar($calendarId,$newValues['displayname'],null,$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']); return true; diff --git a/apps/calendar/templates/part.editcalendar.php b/apps/calendar/templates/part.editcalendar.php index c2c22913bee..b4ff573ec81 100644 --- a/apps/calendar/templates/part.editcalendar.php +++ b/apps/calendar/templates/part.editcalendar.php @@ -25,12 +25,6 @@
- - - - - - -
 
t('Description') ?> - -
t('Calendar color') ?> diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php index 37493674371..b8805e6b6ef 100644 --- a/apps/calendar/templates/part.import.php +++ b/apps/calendar/templates/part.import.php @@ -31,11 +31,6 @@ foreach($calendars as $calendar){
t('Description') ?> - -


@@ -65,8 +60,7 @@ function importcal(importtype){ } if(importtype == "new"){ var calname = $("#displayname").val(); - var description = $("#description").val(); - $.post(OC.filePath('calendar', '', 'import.php'), {'import':'new', 'calname':calname, 'description':description, 'path':path, 'file':file}, function(){ + $.post(OC.filePath('calendar', '', 'import.php'), {'import':'new', 'calname':calname, 'path':path, 'file':file}, function(){ $("#importdialog").dialog('destroy').remove(); $("#importdialogholder").remove(); }); -- cgit v1.2.3 From 6b64aa3faf1e94a2fc2a1e98b35418d35b73ab22 Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Sat, 8 Oct 2011 13:54:45 +0200 Subject: removed description. changed target to _blank. removed sorting. updated layout. --- apps/bookmarks/addBm.php | 1 - apps/bookmarks/ajax/addBookmark.php | 5 ++- apps/bookmarks/ajax/editBookmark.php | 3 +- apps/bookmarks/ajax/updateList.php | 2 +- apps/bookmarks/appinfo/database.xml | 7 ----- apps/bookmarks/bookmarksHelper.php | 4 --- apps/bookmarks/css/bookmarks.css | 60 +++++++++++++++--------------------- apps/bookmarks/js/addBm.js | 3 +- apps/bookmarks/js/bookmarks.js | 46 ++++++--------------------- apps/bookmarks/templates/addBm.php | 1 - apps/bookmarks/templates/list.php | 14 ++------- 11 files changed, 41 insertions(+), 105 deletions(-) diff --git a/apps/bookmarks/addBm.php b/apps/bookmarks/addBm.php index a2a39134eab..a7cdcee8faa 100644 --- a/apps/bookmarks/addBm.php +++ b/apps/bookmarks/addBm.php @@ -41,6 +41,5 @@ $metadata = getURLMetadata($url); $tmpl->assign('URL', htmlentities($metadata['url'])); $tmpl->assign('TITLE', htmlentities($metadata['title'])); -$tmpl->assign('DESCRIPTION', htmlentities($metadata['description'])); $tmpl->printPage(); diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php index 0dc83d9014d..0a7cdfc9be3 100644 --- a/apps/bookmarks/ajax/addBookmark.php +++ b/apps/bookmarks/ajax/addBookmark.php @@ -40,15 +40,14 @@ if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ //FIXME: Detect when user adds a known URL $query = OC_DB::prepare(" INSERT INTO *PREFIX*bookmarks - (url, title, description, user_id, public, added, lastmodified) - VALUES (?, ?, ?, ?, 0, $_ut, $_ut) + (url, title, user_id, public, added, lastmodified) + VALUES (?, ?, ?, 0, $_ut, $_ut) "); $params=array( htmlspecialchars_decode($_GET["url"]), htmlspecialchars_decode($_GET["title"]), - htmlspecialchars_decode($_GET["description"]), OC_User::getUser() ); $query->execute($params); diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php index b427a175e5f..e205f69bf5a 100644 --- a/apps/bookmarks/ajax/editBookmark.php +++ b/apps/bookmarks/ajax/editBookmark.php @@ -41,14 +41,13 @@ $bookmark_id = (int)$_GET["id"]; $query = OC_DB::prepare(" UPDATE *PREFIX*bookmarks - SET url = ?, title =?, description = ?, lastmodified = $_ut + SET url = ?, title =?, lastmodified = $_ut WHERE id = $bookmark_id "); $params=array( htmlspecialchars_decode($_GET["url"]), htmlspecialchars_decode($_GET["title"]), - htmlspecialchars_decode($_GET["description"]), ); $query->execute($params); diff --git a/apps/bookmarks/ajax/updateList.php b/apps/bookmarks/ajax/updateList.php index 8e9bda0bc20..f2c81256bb6 100644 --- a/apps/bookmarks/ajax/updateList.php +++ b/apps/bookmarks/ajax/updateList.php @@ -59,7 +59,7 @@ if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ } $query = OC_DB::prepare(' - SELECT id, url, title, description, + SELECT id, url, title, CASE WHEN *PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id THEN GROUP_CONCAT( tag ' .$_gc_separator. ' ) ELSE \' \' diff --git a/apps/bookmarks/appinfo/database.xml b/apps/bookmarks/appinfo/database.xml index c30db8bd0c8..fca38ad84b2 100644 --- a/apps/bookmarks/appinfo/database.xml +++ b/apps/bookmarks/appinfo/database.xml @@ -29,13 +29,6 @@ true 140 - - description - text - - false - 255 - user_id text diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php index d674e595a80..f66d98a8ccb 100644 --- a/apps/bookmarks/bookmarksHelper.php +++ b/apps/bookmarks/bookmarksHelper.php @@ -19,10 +19,6 @@ function getURLMetadata($url) { $metadata['title'] = htmlspecialchars_decode(@$match[1]); $meta = get_meta_tags($url); - - if(array_key_exists('description', $meta)) { - $metadata['description'] = $meta['description']; - } return $metadata; } \ No newline at end of file diff --git a/apps/bookmarks/css/bookmarks.css b/apps/bookmarks/css/bookmarks.css index 0fc6a2ad608..233d4a02944 100644 --- a/apps/bookmarks/css/bookmarks.css +++ b/apps/bookmarks/css/bookmarks.css @@ -12,34 +12,13 @@ padding: 0.5ex; } -.bookmark_actions { - font-size: smaller; - color: #ff44ff; - padding-left: 4em; -} - -.bookmark_actions span:hover { - cursor: pointer; - text-decoration: underline; -} - -.bookmarks_sorting { - float: left; - margin-left: 2em; -} - -.bookmarks_sorting li { - padding: 1ex 1em; - border: 1px solid gray; - -moz-border-radius:1em; -webkit-border-radius:1em; border-radius:1em; -} - -.bookmarks_sorting_active { - font-weight: bold; -} - .bookmarks_add { display: none; + margin-top: 45px; +} + +.bookmarks_list { + margin-top: 45px; } .bookmarks_addBml { @@ -56,15 +35,28 @@ width: 20em; } +.bookmark_actions { + display: none; + font-size: smaller; + color: #666; + padding-left: 4em; +} + +.bookmark_actions span:hover { + cursor: pointer; + text-decoration: underline; +} + .bookmark_single { - margin-left: 2em; - margin-top: 3ex; - padding: 0.5ex; -/* border-bottom: 1px solid black; */ + padding: 0.5em 1em; } .bookmark_single:hover { - background-color: #ccccff; + background-color: #EAEAEA; +} + +.bookmark_single:hover .bookmark_actions { + display: block; } .bookmark_title { @@ -77,14 +69,10 @@ color: green; } -.bookmark_tags { +.bookmark_tag { color: #ff3333; } -.clear { - clear:both; -} - .loading_meta { display: none; margin-left: 5px; diff --git a/apps/bookmarks/js/addBm.js b/apps/bookmarks/js/addBm.js index 7c914f2338a..6e13b59bb2e 100644 --- a/apps/bookmarks/js/addBm.js +++ b/apps/bookmarks/js/addBm.js @@ -5,11 +5,10 @@ $(document).ready(function() { function addBookmark(event) { var url = $('#bookmark_add_url').val(); var title = $('#bookmark_add_title').val(); - var description = $('#bookmark_add_description').val(); var tags = $('#bookmark_add_tags').val(); $.ajax({ url: 'ajax/addBookmark.php', - data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&description=' + encodeURI(description) + '&tags=' + encodeURI(tags), + data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags), success: function(data){ location.href='index.php'; } diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js index 8c0b74b6c67..51646e5382b 100644 --- a/apps/bookmarks/js/bookmarks.js +++ b/apps/bookmarks/js/bookmarks.js @@ -12,9 +12,6 @@ $(document).ready(function() { $(window).scroll(updateOnBottom); $('#bookmark_add_url').focusout(getMetadata); - $('.' + bookmarks_sorting).addClass('bookmarks_sorting_active'); - - $('.bookmarks_sorting li').click(function(event){changeSorting(this)}); $('.bookmarks_list').empty(); getBookmarks(); @@ -39,6 +36,7 @@ function getBookmarks() { for(var i in bookmarks.data) { updateBookmarksList(bookmarks.data[i]); } + $('.bookmark_link').click(recordClick); $('.bookmark_delete').click(delBookmark); $('.bookmark_edit').click(showBookmark); @@ -57,36 +55,21 @@ function getMetadata() { success: function(pageinfo){ $('#bookmark_add_url').val(pageinfo.data.url); $('#bookmark_add_title').val(pageinfo.data.title); - if (pageinfo.data.description !== undefined){ - $('#bookmark_add_description').val(pageinfo.data.description); - } $('.loading_meta').css('display','none'); } }); } -function changeSorting(sortEl) { - $('.' + bookmarks_sorting).removeClass('bookmarks_sorting_active'); - bookmarks_sorting = sortEl.className; - $('.' + bookmarks_sorting).addClass('bookmarks_sorting_active'); - - $('.bookmarks_list').empty(); - bookmarks_page = 0; - bookmarks_loading = false; - getBookmarks(); -} - // function addBookmark() { // Instead of creating editBookmark() function, Converted the one above to // addOrEditBookmark() to make .js file more compact. function addOrEditBookmark(event) { var id = $('#bookmark_add_id').val(); - var url = encodeEntities($('#bookmark_add_url').val()) - var title = encodeEntities($('#bookmark_add_title').val()) - var description = encodeEntities($('#bookmark_add_description').val()) - var tags = encodeEntities($('#bookmark_add_tags').val()) - var taglist = tags.split(' ') + var url = encodeEntities($('#bookmark_add_url').val()); + var title = encodeEntities($('#bookmark_add_title').val()); + var tags = encodeEntities($('#bookmark_add_tags').val()); + var taglist = tags.split(' '); var tagshtml = ''; for ( var i=0, len=taglist.length; i' + taglist[i] + ' '; @@ -95,16 +78,15 @@ function addOrEditBookmark(event) { if (id == 0) { $.ajax({ url: 'ajax/addBookmark.php', - data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&description=' + encodeURI(description) + '&tags=' + encodeURI(tags), + data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags), success: function(response){ var bookmark_id = response.data; $('.bookmarks_add').slideToggle(); $('.bookmarks_add').children('p').children('.bookmarks_input').val(''); $('.bookmarks_list').prepend( '
' + - '

' + title + '

' + + '

' + title + '

' + '

' + url + '

' + - '

' + description + '

' + '

' + tagshtml + '

' + '

Delete Edit

' + '
' @@ -115,8 +97,7 @@ function addOrEditBookmark(event) { else { $.ajax({ url: 'ajax/editBookmark.php', - data: 'id=' + id + '&url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&description=' + - encodeURI(description) + '&tags=' + encodeURI(tags), + data: 'id=' + id + '&url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags), success: function(){ $('.bookmarks_add').slideToggle(); $('.bookmarks_add').children('p').children('.bookmarks_input').val(''); @@ -124,7 +105,6 @@ function addOrEditBookmark(event) { var record = $('.bookmark_single[data-id = "' + id + '"]'); record.children('.bookmark_url:first').text(url); - record.children('.bookmark_description:first').text(description); var record_title = record.children('.bookmark_title:first').children('a:first'); record_title.attr('href', url); @@ -138,7 +118,7 @@ function addOrEditBookmark(event) { } function delBookmark(event) { - var record = $(this).parent().parent() + var record = $(this).parent().parent(); $.ajax({ url: 'ajax/delBookmark.php', data: 'url=' + encodeURI($(this).parent().parent().children('.bookmark_url:first').text()), @@ -151,7 +131,6 @@ function showBookmark(event) { $('#bookmark_add_id').val(record.attr('data-id')); $('#bookmark_add_url').val(record.children('.bookmark_url:first').text()); $('#bookmark_add_title').val(record.children('.bookmark_title:first').text()); - $('#bookmark_add_description').val(record.children('.bookmark_description:first').text()); $('#bookmark_add_tags').val(record.children('.bookmark_tags:first').text()); if ($('.bookmarks_add').css('display') == 'none') { @@ -163,10 +142,6 @@ function showBookmark(event) { } -function editBookmark(event) { - -} - function updateBookmarksList(bookmark) { var tags = encodeEntities(bookmark.tags).split(' '); var taglist = ''; @@ -178,9 +153,8 @@ function updateBookmarksList(bookmark) { } $('.bookmarks_list').append( '
' + - '

' + encodeEntities(bookmark.title) + '

' + + '

' + encodeEntities(bookmark.title) + '

' + '

' + encodeEntities(bookmark.url) + '

' + - '

' + encodeEntities(bookmark.description) + '

' + '

' + taglist + '

' + '

Delete Edit

' + '
' diff --git a/apps/bookmarks/templates/addBm.php b/apps/bookmarks/templates/addBm.php index 36f04e135b6..c285c3579c5 100644 --- a/apps/bookmarks/templates/addBm.php +++ b/apps/bookmarks/templates/addBm.php @@ -1,7 +1,6 @@

-

diff --git a/apps/bookmarks/templates/list.php b/apps/bookmarks/templates/list.php index 052531f4011..ccfe74f008f 100644 --- a/apps/bookmarks/templates/list.php +++ b/apps/bookmarks/templates/list.php @@ -8,28 +8,18 @@ */ ?> -

t('Bookmarks with tag: ') . urldecode($_GET["tag"]) : $l->t('All bookmarks'); ?>

-
+

-

-

-
-
    -
  • t('Recent Bookmarks'); ?>
  • -
  • t('Most clicks'); ?>
  • -
-
-
t('You have no bookmarks'); ?> -
+
\ No newline at end of file -- cgit v1.2.3 From bbd96fdd39902ae0c2c52342627f705c592d720b Mon Sep 17 00:00:00 2001 From: Marvin Thomas Rabe Date: Sat, 8 Oct 2011 16:02:43 +0200 Subject: webkit searchfield bug fixed --- core/css/styles.css | 1 + 1 file changed, 1 insertion(+) diff --git a/core/css/styles.css b/core/css/styles.css index 5d4df586a8e..46b340be961 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -34,6 +34,7 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35537a', end input[type="text"], input[type="password"] { cursor:text; } input, select, .button, #quota, div.jp-progress, .pager li a { font-size:1em; width:10em; margin:.3em; padding:.6em .5em .4em; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; } input[type="text"], input[type="password"], input[type="search"] { background:#f8f8f8; color:#555; cursor:text; } +input[type="text"], input[type="password"], input[type="search"] { -webkit-appearance:textfield; -webkit-box-sizing:content-box; } input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover, input[type="password"]:focus, input[type="search"]:hover, input[type="search"]:focus { background:#fff; color:#333; } input[type="submit"], input[type="button"], .button, #quota, div.jp-progress, .pager li a { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; } -- cgit v1.2.3 From 4a4e6eb0712bc2f7f188325d2ac87b8aa4927cd8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 8 Oct 2011 19:42:09 +0200 Subject: apps/bookmarks: follow redirects when fetching title This solves a problem where hitting a redirect page would lead to a "302 Found" title. Signed-off-by: Florian Pritz --- apps/bookmarks/bookmarksHelper.php | 49 +++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php index f66d98a8ccb..b445154f526 100644 --- a/apps/bookmarks/bookmarksHelper.php +++ b/apps/bookmarks/bookmarksHelper.php @@ -1,5 +1,52 @@ 0); + curl_setopt($ch, CURLOPT_MAXREDIRS, $mr); + } else { + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); + if ($mr > 0) { + $newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); + + $rch = curl_copy_handle($ch); + curl_setopt($rch, CURLOPT_HEADER, true); + curl_setopt($rch, CURLOPT_NOBODY, true); + curl_setopt($rch, CURLOPT_FORBID_REUSE, false); + curl_setopt($rch, CURLOPT_RETURNTRANSFER, true); + do { + curl_setopt($rch, CURLOPT_URL, $newurl); + $header = curl_exec($rch); + if (curl_errno($rch)) { + $code = 0; + } else { + $code = curl_getinfo($rch, CURLINFO_HTTP_CODE); + if ($code == 301 || $code == 302) { + preg_match('/Location:(.*?)\n/', $header, $matches); + $newurl = trim(array_pop($matches)); + } else { + $code = 0; + } + } + } while ($code && --$mr); + curl_close($rch); + if (!$mr) { + if ($maxredirect === null) { + trigger_error('Too many redirects. When following redirects, libcurl hit the maximum amount.', E_USER_WARNING); + } else { + $maxredirect = 0; + } + return false; + } + curl_setopt($ch, CURLOPT_URL, $newurl); + } + } + return curl_exec($ch); +} + function getURLMetadata($url) { //allow only http(s) and (s)ftp $protocols = '/^[hs]{0,1}[tf]{0,1}tp[s]{0,1}\:\/\//i'; @@ -12,7 +59,7 @@ function getURLMetadata($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - $page = curl_exec($ch); + $page = curl_exec_follow($ch); curl_close($ch); @preg_match( "/(.*)<\/title>/si", $page, $match ); -- cgit v1.2.3 From 19d4e6e1d56e9e2c0476ff178083b4c35a9fb6d1 Mon Sep 17 00:00:00 2001 From: Florian Pritz <bluewind@xinu.at> Date: Sat, 8 Oct 2011 21:06:39 +0200 Subject: apps/bookmarks: remove unused variable This is not needed anymore since commit 6b64aa3faf1e94a2fc2a1e98b35418d35b73ab22. Signed-off-by: Florian Pritz <bluewind@xinu.at> --- apps/bookmarks/bookmarksHelper.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php index b445154f526..44d4235b9b3 100644 --- a/apps/bookmarks/bookmarksHelper.php +++ b/apps/bookmarks/bookmarksHelper.php @@ -65,7 +65,5 @@ function getURLMetadata($url) { @preg_match( "/<title>(.*)<\/title>/si", $page, $match ); $metadata['title'] = htmlspecialchars_decode(@$match[1]); - $meta = get_meta_tags($url); - return $metadata; } \ No newline at end of file -- cgit v1.2.3 From 88aa40e6ace17b105aa9355e0e389377775ea3e4 Mon Sep 17 00:00:00 2001 From: Bart Visscher <bartv@thisnet.nl> Date: Sat, 8 Oct 2011 00:00:49 +0200 Subject: Show add contact form on opening contacts page --- apps/contacts/js/interface.js | 7 ------- apps/contacts/templates/index.php | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js index 0fcfdeaab5d..2f4a736f553 100644 --- a/apps/contacts/js/interface.js +++ b/apps/contacts/js/interface.js @@ -1,11 +1,4 @@ $(document).ready(function(){ - /*------------------------------------------------------------------------- - * Actions for startup - *-----------------------------------------------------------------------*/ - if( $('#leftcontent li').length > 0 ){ - $('#leftcontent li').first().addClass('active'); - } - /*------------------------------------------------------------------------- * Event handlers *-----------------------------------------------------------------------*/ diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index 6d67584b29e..98ebc1b0b36 100644 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -14,5 +14,5 @@ OC_Util::addStyle('contacts','styles'); </ul> </div> <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>"> - <?php echo $this->inc("part.details"); ?> + <?php echo $this->inc("part.addcardform"); ?> </div> -- cgit v1.2.3 From 203f7a3a870964310060d82bdd61d14eb1613791 Mon Sep 17 00:00:00 2001 From: Bart Visscher <bartv@thisnet.nl> Date: Sat, 8 Oct 2011 00:13:39 +0200 Subject: Move contact delete button to top right corner --- apps/contacts/css/styles.css | 1 + apps/contacts/templates/part.details.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/contacts/css/styles.css b/apps/contacts/css/styles.css index 1f95fdb2ad4..c1abd0efb62 100644 --- a/apps/contacts/css/styles.css +++ b/apps/contacts/css/styles.css @@ -1,2 +1,3 @@ .contacts_details_left {text-align:right;vertical-align:top;padding:2px;} .contacts_details_right {text-align:left;vertical-align:top;padding:2px;} +#contacts_deletecard {position:absolute;top:15px;right:0;} diff --git a/apps/contacts/templates/part.details.php b/apps/contacts/templates/part.details.php index 26a33739acb..438f84d45d4 100644 --- a/apps/contacts/templates/part.details.php +++ b/apps/contacts/templates/part.details.php @@ -28,7 +28,7 @@ <?php endforeach; ?> </table> <form> - <input type="button" id="contacts_deletecard" value="<?php echo $l->t('Delete');?>"> + <img class="svg action" id="contacts_deletecard" src="<?php echo image_path('', 'actions/delete.svg'); ?>" title="<?php echo $l->t('Delete contact');?>" /> <input type="button" id="contacts_addproperty" value="<?php echo $l->t('Add Property');?>"> </form> <?php endif; ?> -- cgit v1.2.3