From 08f9a9a8c3602f96ec4431a93d29ae7fd5c8b118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Thu, 23 Jan 2014 02:56:24 +0100 Subject: [PATCH] exported link-sharing interface and style to separate files to be used independently of event editing interface --- css/linkshare.css | 75 ++++++++++++++++++++++++++++++++++++ css/style.css | 71 ---------------------------------- index.php | 1 + templates/part.linkshare.php | 54 ++++++++++++++++++++++++++ templates/part.share.php | 63 +++++------------------------- 5 files changed, 140 insertions(+), 124 deletions(-) create mode 100644 css/linkshare.css create mode 100644 templates/part.linkshare.php diff --git a/css/linkshare.css b/css/linkshare.css new file mode 100644 index 00000000..01b7d722 --- /dev/null +++ b/css/linkshare.css @@ -0,0 +1,75 @@ +/* +-----------------------------------------------------------------------+ *\ +|* | share widget styling | *| +|* | (c) 2014 Michał "rysiek" Woźniak | *| +|* | Licensed under AGPL | *| +\* +-----------------------------------------------------------------------+ */ +.share-link-container h3 { + font-weight:bold; +} +.share-link-container input[type="checkbox"] { + vertical-align:middle; +} +.share-link-container input[type="text"], +.share-link-container input[type="e-mail"], +.share-link-container input[type="password"], +.share-link-container input[type="submit"], +.share-link-container input[type="date"] { + color:#333; + font-family: "Lucida Grande", Arial, Verdana, sans-serif; + font-size: 1em; + box-sizing: content-box; + background: #fff; + cursor: text; + margin: .3em 0px; + padding: .6em .5em .4em; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; + width:100%; + min-width:10em; + box-sizing:border-box; +} +.share-link-container input[type="submit"] { + cursor:pointer; +} +.share-link-container input:invalid { + background:#fee; +} +/* by default, in a .displayable-container do not display direct-descending .displayable */ +.displayable-container > .displayable { + max-height:0px; + -moz-transition:max-height ease-out 0.5s, opacity ease-out 0.5s; + -webkit-transition:max-height ease-out 0.5s, opacity ease-out 0.5s; + transition:max-height ease-out 0.5s, opacity ease-out 0.5s; + overflow:hidden; + opacity:0.1; +} +/* a marker to end a given displayable */ +.displayable-container > .displayable:last-child::after { + width:75%; + height:0px; + display:block; + content:" "; + margin:0.2em auto 0.5em auto; + border-top:solid 1px #ddd; +} +/* display the rest once the checkbox is :checked */ +.displayable-container > .displayable-control:checked ~ .displayable { + max-height:500px; + opacity:1; + -moz-transition:max-height ease-in 1s, opacity ease-in 0.5s; + -webkit-transition:max-height ease-in 1s, opacity ease-in 0.5s; + transition:max-height ease-in 1s, opacity ease-in 0.5s; +} +/* e-mail form */ +.e-mail-form-container { + display:flex; + flex-direction:row; +} +.e-mail-form-container > input { + flex:auto 1; +} +.e-mail-form-container > input[type="submit"] { + min-width:5em; + width:auto; +} \ No newline at end of file diff --git a/css/style.css b/css/style.css index 64274a01..6b5f9ab8 100644 --- a/css/style.css +++ b/css/style.css @@ -332,75 +332,4 @@ button.category{margin:0 3px;} #event.event.link-shared .location, #event.event.link-shared .description { font-weight: bold; -} - -.share-link-container h3 { - font-weight:bold; -} -.share-link-container input[type="checkbox"] { - vertical-align:middle; -} -.share-link-container input[type="text"], -.share-link-container input[type="e-mail"], -.share-link-container input[type="password"], -.share-link-container input[type="submit"], -.share-link-container input[type="date"] { - color:#333; - font-family: "Lucida Grande", Arial, Verdana, sans-serif; - font-size: 1em; - box-sizing: content-box; - background: #fff; - cursor: text; - margin: .3em 0px; - padding: .6em .5em .4em; - border: 1px solid #ddd; - outline: none; - border-radius: 3px; - width:100%; - min-width:10em; - box-sizing:border-box; -} -.share-link-container input[type="submit"] { - cursor:pointer; -} -.share-link-container input:invalid { - background:#fee; -} -/* by default, in a .displayable-container do not display direct-descending .displayable */ -.displayable-container > .displayable { - max-height:0px; - -moz-transition:max-height ease-out 0.5s, opacity ease-out 0.5s; - -webkit-transition:max-height ease-out 0.5s, opacity ease-out 0.5s; - transition:max-height ease-out 0.5s, opacity ease-out 0.5s; - overflow:hidden; - opacity:0.1; -} -/* a marker to end a given displayable */ -.displayable-container > .displayable:last-child::after { - width:75%; - height:0px; - display:block; - content:" "; - margin:0.2em auto 0.5em auto; - border-top:solid 1px #ddd; -} -/* display the rest once the checkbox is :checked */ -.displayable-container > .displayable-control:checked ~ .displayable { - max-height:500px; - opacity:1; - -moz-transition:max-height ease-in 1s, opacity ease-in 0.5s; - -webkit-transition:max-height ease-in 1s, opacity ease-in 0.5s; - transition:max-height ease-in 1s, opacity ease-in 0.5s; -} -/* e-mail form */ -.e-mail-form-container { - display:flex; - flex-direction:row; -} -.e-mail-form-container > input { - flex:auto 1; -} -.e-mail-form-container > input[type="submit"] { - min-width:5em; - width:auto; } \ No newline at end of file diff --git a/index.php b/index.php index 056cafbf..35fa3c96 100644 --- a/index.php +++ b/index.php @@ -35,6 +35,7 @@ if(OCP\Config::getUserValue(OCP\USER::getUser(), "calendar", "timezone") == null } OCP\Util::addscript('calendar', 'calendar'); OCP\Util::addStyle('calendar', 'style'); +OCP\Util::addStyle('calendar', 'linkshare'); OCP\Util::addscript('', 'jquery.multiselect'); OCP\Util::addStyle('', 'jquery.multiselect'); OCP\Util::addscript('calendar','jquery.multi-autocomplete'); diff --git a/templates/part.linkshare.php b/templates/part.linkshare.php new file mode 100644 index 00000000..0bb94344 --- /dev/null +++ b/templates/part.linkshare.php @@ -0,0 +1,54 @@ + + Licensed under AGPL. +*/ ?> + + \ No newline at end of file diff --git a/templates/part.share.php b/templates/part.share.php index 20364add..4fc03806 100644 --- a/templates/part.share.php +++ b/templates/part.share.php @@ -75,59 +75,16 @@ if(is_array($sharedwithByEvent)) { } ?>
" data-eventid="" data-location="" data-description="" data-dtstart="" data-dtend=""> -
- - - - -
+
assign('item_id', $_['eventid']); +$tmpl->assign('permissions', $_['permissions']); +$tmpl->assign('link_share', $linkShare); +$tmpl->assign('shared', $shared); +$tmpl->printpage(); +/* end link-sharing an event */ +?>
t('Shared via calendar')); ?>