diff --git a/include/text.php b/include/text.php index 6f66cef65..5aaf04729 100644 --- a/include/text.php +++ b/include/text.php @@ -1300,6 +1300,7 @@ function file_tag_save_file($uid,$item,$file) { $saved = get_pconfig($uid,'system','filetags'); if((! strlen($saved)) || (! stristr($saved,'[' . file_tag_encode($file) . ']'))) set_pconfig($uid,'system','filetags',$saved . '[' . file_tag_encode($file) . ']'); + info( t('Item filed') ); } return true; } diff --git a/mod/filer.php b/mod/filer.php index a9e213536..82537848b 100755 --- a/mod/filer.php +++ b/mod/filer.php @@ -16,8 +16,20 @@ function filer_content(&$a) { logger('filer: tag ' . $term . ' item ' . $item_id); - if($item_id && strlen($term)) + if($item_id && strlen($term)){ + // file item file_tag_save_file(local_user(),$item_id,$term); - + } else { + // return filer dialog + $filetags = get_pconfig(local_user(),'system','filetags'); + $filetags = explode("][", trim($filetags,"[]")); + $tpl = get_markup_template("filer_dialog.tpl"); + $o = replace_macros($tpl, array( + '$field' => array('term', t("File as:"), '', '', $filetags, t('- select -')), + '$submit' => t('Save'), + )); + + echo $o; + } killme(); } diff --git a/view/field_combobox.tpl b/view/field_combobox.tpl new file mode 100644 index 000000000..658133071 --- /dev/null +++ b/view/field_combobox.tpl @@ -0,0 +1,18 @@ + +
+ + {# html5 don't work on Chrome, Safari and IE9 + + + {{ for $field.4 as $opt=>$val }} #} + + + + + $field.3 +
+ diff --git a/view/filer_dialog.tpl b/view/filer_dialog.tpl new file mode 100644 index 000000000..ae837d6b7 --- /dev/null +++ b/view/filer_dialog.tpl @@ -0,0 +1,4 @@ +{{ inc field_combobox.tpl }}{{ endinc }} +
+ +
diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 99e3aa0ec..67e5eb681 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -264,15 +264,36 @@ function enableOnUser(){ } function itemFiler(id) { - reply = prompt("$fileas"); - if(reply && reply.length) { - commentBusy = true; - $('body').css('cursor', 'wait'); - $.get('filer/' + id + '?term=' + reply); - if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,3000); - liking = 1; - } + + var bordercolor = $("input").css("border-color"); + + $.get('filer/', function(data){ + $.fancybox(data); + $("#id_term").keypress(function(){ + $(this).css("border-color",bordercolor); + }) + $("#select_term").change(function(){ + $("#id_term").css("border-color",bordercolor); + }) + + $("#filer_save").click(function(e){ + e.preventDefault(); + reply = $("#id_term").val(); + if(reply && reply.length) { + commentBusy = true; + $('body').css('cursor', 'wait'); + $.get('filer/' + id + '?term=' + reply); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,3000); + liking = 1; + $.fancybox.close(); + } else { + $("#id_term").css("border-color","#FF0000"); + } + return false; + }); + }); + } function jotClearLocation() { diff --git a/view/theme/dispy-dark/communityhome.tpl b/view/theme/dispy-dark/communityhome.tpl index dfc0467f7..2876f936e 100644 --- a/view/theme/dispy-dark/communityhome.tpl +++ b/view/theme/dispy-dark/communityhome.tpl @@ -2,8 +2,43 @@
$page
{{ endif }} -

PostIt to Friendica

-
-Post to Friendica from anywhere by bookmarking this Link. +{{ if $lastusers_title }} +

Help or '@NewHere'?

+
+Friendica Support
+Let's talk
+Local Friendica
+NewHere
{{ endif }} + +{{ if $lastusers_title }} +

Connectable Services

+
+Facebook +StatusNet +LiveJournal +Posterous
+Tumblr +Twitter +WordPress +E-Mail +
+{{ endif }} + +

PostIt to Friendica

+
+Post to Friendica from anywhere by bookmarking this link. +
+ diff --git a/view/theme/dispy-dark/default.php b/view/theme/dispy-dark/default.php new file mode 100644 index 000000000..e74ec1a4f --- /dev/null +++ b/view/theme/dispy-dark/default.php @@ -0,0 +1,20 @@ + + + + <?php if(x($page,'title')) echo $page['title'] ?> + + + + + + +
+ +
+ + + + diff --git a/view/theme/dispy-dark/jot-header.tpl b/view/theme/dispy-dark/jot-header.tpl index 4c8f59d79..92eccf740 100644 --- a/view/theme/dispy-dark/jot-header.tpl +++ b/view/theme/dispy-dark/jot-header.tpl @@ -264,17 +264,39 @@ function enableOnUser(){ } function itemFiler(id) { - reply = prompt("$fileas"); - if(reply && reply.length) { - commentBusy = true; - $('body').css('cursor', 'wait'); - $.get('filer/' + id + '?term=' + reply); - if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,3000); - liking = 1; - } + + var bordercolor = $("input").css("border-color"); + + $.get('filer/', function(data){ + $.fancybox(data); + $("#id_term").keypress(function(){ + $(this).css("border-color",bordercolor); + }) + $("#select_term").change(function(){ + $("#id_term").css("border-color",bordercolor); + }) + + $("#filer_save").click(function(e){ + e.preventDefault(); + reply = $("#id_term").val(); + if(reply && reply.length) { + commentBusy = true; + $('body').css('cursor', 'wait'); + $.get('filer/' + id + '?term=' + reply); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,3000); + liking = 1; + $.fancybox.close(); + } else { + $("#id_term").css("border-color","#FF0000"); + } + return false; + }); + }); + } + function jotClearLocation() { $('#jot-coord').val(''); $('#profile-nolocation-wrapper').hide(); diff --git a/view/theme/dispy-dark/nav.tpl b/view/theme/dispy-dark/nav.tpl index 589d68352..e38b2bbe2 100644 --- a/view/theme/dispy-dark/nav.tpl +++ b/view/theme/dispy-dark/nav.tpl @@ -45,13 +45,7 @@ works --> {{ endif }}
- - -
+
$sitelocation
+ + diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 8be441c8b..361648999 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -251,7 +251,7 @@ input[type=submit] { * nav */ nav { - height: 85px; + height: 60px; display: block; background-color: #1d1f1d; color: #eeeeec; @@ -469,7 +469,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link width: 170px; position: absolute; top: -19px; - left: 15px; + left: 7px; } #nav-floater { position: fixed; @@ -480,13 +480,14 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link color: transparent; border-radius: 5px; z-index: 100; - width: 28%; - height: 80px; + width: 300px; + height: 60px; } #nav-buttons { clear: both; list-style: none; padding: 0px; + margin: 0 7px 0 0; height: 25px; } #nav-buttons li { @@ -506,18 +507,24 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link } .search-box { display: inline-block; - height: 20px; - margin: 0; - position: relative; - left: 7px; - top: 5px; - /*width: 210px;*/ + margin: 5px; + position: fixed; + right: 0px; + bottom: 0px; + z-index: 100; + background: #1d1f1d; + border-radius: 5px; } #search-text { border: 1px #eec solid; background: #2e2f2e; color: #eec; } +.search-box #search-text { + margin: 8px; + width: 10em; + color: #eec; +} nav #user-menu { display: block; width: 75%; @@ -529,8 +536,8 @@ nav #user-menu { border-radius: 5px; background: #555753 url("menu-user-pin.jpg") 98% center no-repeat; clear: both; - top: 12px; - left: 7px; + top: 4px; + left: 10px; } nav #user-menu-label { font-size: 12px; @@ -641,6 +648,7 @@ nav #user-menu-label { background: #ddd; } + /** sysmsg **/ #sysmsg_info { position: fixed; @@ -752,6 +760,7 @@ aside #viewcontacts { margin: 0px 0px 0px 0px; } + /** * contacts block */ @@ -1018,7 +1027,7 @@ aside #viewcontacts { * section */ section { - margin: 20px 8% 0 4%; + margin: 20px 9% 0 4%; font-size: 0.8em; padding-right: 230px; min-width: 475px; @@ -1057,6 +1066,7 @@ section { text-decoration: none; } + /** * items */ @@ -1129,7 +1139,7 @@ section { border-radius: 5px; } [class^="wall-item-tools"] > *, [class^="wall-item-tools"] > * > * { - margin: 0 0 5px 0; + /*margin: 0 0 5px 0;*/ } .wall-item-tools { float: right; @@ -1150,6 +1160,12 @@ section { -ms-transition: all 1s ease-in-out; transition: all 1s ease-in-out; } +.wall-item-subtools1 { + list-style: none; +} +.wall-item-subtools2 { + list-style: none; +} .wall-item-title { font-size: 1.2em; font-weight: bold; @@ -1260,6 +1276,24 @@ section { overflow: auto; width: 100%; } +#connect-services-header { + +} +#connect-services { + margin: 5px 0 0 0; +} +#extra-help-header { + +} +#extra-help { + margin: 5px 0 0 0; +} +#postit-header { + +} +#postit { + margin: 5px 0 0 0; +} /** diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index 4c938997b..372757752 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -91,11 +91,13 @@ $(document).ready(function() { $('.floaterflip').css({ backgroundPosition: '-210px -60px' }); + $('.search-box').slideDown('fast'); } else { $('#nav-floater').slideDown('fast'); $('.floaterflip').css({ backgroundPosition: '-190px -60px' }); + $('.search-box').slideUp('fast'); } }; // our trigger for the toolbar button @@ -144,13 +146,20 @@ function dispydark_community_info() { } else { a_funct(); } - })();" ; + })();"; $aside['$fostitJS'] = $fostitJS; $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); - $a->page['aside'] = replace_macros($tpl, $aside); + $a->page['aside_bottom'] = replace_macros($tpl, $aside); } +// use our 'default.php' instead of the system-wide one +$a->page['template'] = "theme/dispy-dark/default"; + +// aside on profile page +if ($a->argv[0] === "profile") { + dispydark_community_info(); +} diff --git a/view/theme/dispy-dark/wall_item.tpl b/view/theme/dispy-dark/wall_item.tpl index c9ac20c89..4b973bf93 100644 --- a/view/theme/dispy-dark/wall_item.tpl +++ b/view/theme/dispy-dark/wall_item.tpl @@ -15,44 +15,45 @@
{{ if $item.location }}$item.location {{ endif }}
-
- {{ if $item.lock }}
$item.lock
- {{ else }}
{{ endif }} -
- {{ if $item.star }} - - - {{ endif }} - - {{ if $item.vote }} -
- - - {{ if $item.vote.share }} - {{ endif }} - -
- {{ endif }} - - {{ if $item.filer }} - - {{ endif }} - - {{ if $item.plink }} - - {{ endif }} - {{ if $item.edpost }} - - {{ endif }} - -
- {{ if $item.drop.dropping }}{{ endif }} -
- {{ if $item.drop.dropping }}{{ endif }} + +
-
$item.title
diff --git a/view/theme/dispy/communityhome.tpl b/view/theme/dispy/communityhome.tpl index dfc0467f7..2876f936e 100644 --- a/view/theme/dispy/communityhome.tpl +++ b/view/theme/dispy/communityhome.tpl @@ -2,8 +2,43 @@
$page
{{ endif }} -

PostIt to Friendica

-
-Post to Friendica from anywhere by bookmarking this Link. +{{ if $lastusers_title }} +

Help or '@NewHere'?

+ {{ endif }} + +{{ if $lastusers_title }} +

Connectable Services

+
+Facebook +StatusNet +LiveJournal +Posterous
+Tumblr +Twitter +WordPress +E-Mail +
+{{ endif }} + +

PostIt to Friendica

+
+Post to Friendica from anywhere by bookmarking this link. +
+ diff --git a/view/theme/dispy/default.php b/view/theme/dispy/default.php new file mode 100644 index 000000000..e74ec1a4f --- /dev/null +++ b/view/theme/dispy/default.php @@ -0,0 +1,20 @@ + + + + <?php if(x($page,'title')) echo $page['title'] ?> + + + + + + +
+ +
+
+ + + diff --git a/view/theme/dispy/icons/StatusNet.png b/view/theme/dispy/icons/StatusNet.png new file mode 100644 index 000000000..1b5f9a677 Binary files /dev/null and b/view/theme/dispy/icons/StatusNet.png differ diff --git a/view/theme/dispy/icons/email.png b/view/theme/dispy/icons/email.png new file mode 100644 index 000000000..b9d64cb93 Binary files /dev/null and b/view/theme/dispy/icons/email.png differ diff --git a/view/theme/dispy/icons/facebook.png b/view/theme/dispy/icons/facebook.png new file mode 100644 index 000000000..ff5129f94 Binary files /dev/null and b/view/theme/dispy/icons/facebook.png differ diff --git a/view/theme/dispy/icons/livejournal.png b/view/theme/dispy/icons/livejournal.png new file mode 100644 index 000000000..5ba5f7f7d Binary files /dev/null and b/view/theme/dispy/icons/livejournal.png differ diff --git a/view/theme/dispy/icons/posterous.png b/view/theme/dispy/icons/posterous.png new file mode 100644 index 000000000..d0ae6face Binary files /dev/null and b/view/theme/dispy/icons/posterous.png differ diff --git a/view/theme/dispy/icons/tumblr.png b/view/theme/dispy/icons/tumblr.png new file mode 100644 index 000000000..9d5fcd045 Binary files /dev/null and b/view/theme/dispy/icons/tumblr.png differ diff --git a/view/theme/dispy/icons/twitter.png b/view/theme/dispy/icons/twitter.png new file mode 100644 index 000000000..4a068451e Binary files /dev/null and b/view/theme/dispy/icons/twitter.png differ diff --git a/view/theme/dispy/icons/wordpress.png b/view/theme/dispy/icons/wordpress.png new file mode 100644 index 000000000..6a4e36d45 Binary files /dev/null and b/view/theme/dispy/icons/wordpress.png differ diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl index 4c8f59d79..92eccf740 100644 --- a/view/theme/dispy/jot-header.tpl +++ b/view/theme/dispy/jot-header.tpl @@ -264,17 +264,39 @@ function enableOnUser(){ } function itemFiler(id) { - reply = prompt("$fileas"); - if(reply && reply.length) { - commentBusy = true; - $('body').css('cursor', 'wait'); - $.get('filer/' + id + '?term=' + reply); - if(timer) clearTimeout(timer); - timer = setTimeout(NavUpdate,3000); - liking = 1; - } + + var bordercolor = $("input").css("border-color"); + + $.get('filer/', function(data){ + $.fancybox(data); + $("#id_term").keypress(function(){ + $(this).css("border-color",bordercolor); + }) + $("#select_term").change(function(){ + $("#id_term").css("border-color",bordercolor); + }) + + $("#filer_save").click(function(e){ + e.preventDefault(); + reply = $("#id_term").val(); + if(reply && reply.length) { + commentBusy = true; + $('body').css('cursor', 'wait'); + $.get('filer/' + id + '?term=' + reply); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,3000); + liking = 1; + $.fancybox.close(); + } else { + $("#id_term").css("border-color","#FF0000"); + } + return false; + }); + }); + } + function jotClearLocation() { $('#jot-coord').val(''); $('#profile-nolocation-wrapper').hide(); diff --git a/view/theme/dispy/nav.tpl b/view/theme/dispy/nav.tpl index 589d68352..e38b2bbe2 100644 --- a/view/theme/dispy/nav.tpl +++ b/view/theme/dispy/nav.tpl @@ -45,13 +45,7 @@ works --> {{ endif }}
- - -
+
$sitelocation
    $langselector
+ + diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 74a7809a1..c2c746767 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -251,7 +251,7 @@ input[type=submit] { * nav */ nav { - height: 85px; + height: 60px; display: block; background-color: #2e3436; color: #eeeeec; @@ -469,7 +469,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link width: 170px; position: absolute; top: -19px; - left: 15px; + left: 7px; } #nav-floater { position: fixed; @@ -480,13 +480,14 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link color: transparent; border-radius: 5px; z-index: 100; - width: 28%; - height: 80px; + width: 300px; + height: 60px; } #nav-buttons { clear: both; list-style: none; padding: 0px; + margin: 0 7px 0 0; height: 25px; } #nav-buttons li { @@ -506,18 +507,24 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link } .search-box { display: inline-block; - height: 20px; - margin: 0; - position: relative; - left: 7px; - top: 5px; - /*width: 210px;*/ + margin: 5px; + position: fixed; + right: 0px; + bottom: 0px; + z-index: 100; + background: #1d1f1d; + border-radius: 5px; } #search-text { border: 1px #eec solid; background: #2e3436; color: #eec; } +.search-box #search-text { + margin: 8px; + width: 10em; + color: #eec; +} nav #user-menu { display: block; width: 75%; @@ -529,8 +536,8 @@ nav #user-menu { border-radius: 5px; background: #555753 url("menu-user-pin.jpg") 98% center no-repeat; clear: both; - top: 12px; - left: 7px; + top: 4px; + left: 10px; } nav #user-menu-label { font-size: 12px; @@ -641,6 +648,7 @@ nav #user-menu-label { background: #ddd; } + /** sysmsg **/ #sysmsg_info { position: fixed; @@ -752,6 +760,7 @@ aside #viewcontacts { margin: 0px 0px 0px 0px; } + /** * contacts block */ @@ -1018,7 +1027,7 @@ aside #viewcontacts { * section */ section { - margin: 20px 8% 0 4%; + margin: 20px 9% 0 4%; font-size: 0.8em; padding-right: 230px; min-width: 475px; @@ -1057,6 +1066,7 @@ section { text-decoration: none; } + /** * items */ @@ -1129,7 +1139,7 @@ section { border-radius: 5px; } [class^="wall-item-tools"] > *, [class^="wall-item-tools"] > * > * { - margin: 0 0 5px 0; + /*margin: 0 0 5px 0;*/ } .wall-item-tools { float: right; @@ -1150,6 +1160,12 @@ section { -ms-transition: all 1s ease-in-out; transition: all 1s ease-in-out; } +.wall-item-subtools1 { + list-style: none; +} +.wall-item-subtools2 { + list-style: none; +} .wall-item-title { font-size: 1.2em; font-weight: bold; @@ -1260,6 +1276,24 @@ section { overflow: auto; width: 100%; } +#connect-services-header { + +} +#connect-services { + margin: 5px 0 0 0; +} +#extra-help-header { + +} +#extra-help { + margin: 5px 0 0 0; +} +#postit-header { + +} +#postit { + margin: 5px 0 0 0; +} /** @@ -2328,7 +2362,7 @@ div[id$="wrapper"] br { .field { /*margin-bottom: 10px;*/ /*padding-bottom: 10px;*/ - /*overflow: auto;*/ + overflow: auto; width: 100%; } .field label, label { diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index db8cf5ccd..190872d01 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -91,11 +91,13 @@ $(document).ready(function() { $('.floaterflip').css({ backgroundPosition: '-210px -60px' }); + $('.search-box').slideDown('fast'); } else { $('#nav-floater').slideDown('fast'); $('.floaterflip').css({ backgroundPosition: '-190px -60px' }); + $('.search-box').slideUp('fast'); } }; // our trigger for the toolbar button @@ -131,7 +133,7 @@ function dispy_community_info() { $a = get_app(); $fostitJS = "javascript: (function() { - the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy/fpostit/fpostit.php?url=' + + the_url = '".$a->get_baseurl($ssl_state)."/view/theme/dispy-dark/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); @@ -144,18 +146,20 @@ function dispy_community_info() { } else { a_funct(); } - })();" ; + })();"; $aside['$fostitJS'] = $fostitJS; $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); - $a->page['aside'] = replace_macros($tpl, $aside); + $a->page['aside_bottom'] = replace_macros($tpl, $aside); } -//right_aside at profile pages +// use our 'default.php' instead of the system-wide one +$a->page['template'] = "theme/dispy-dark/default"; + +// aside on profile page if ($a->argv[0] === "profile") { - // COMMUNITY dispy_community_info(); } diff --git a/view/theme/dispy/wall_item.tpl b/view/theme/dispy/wall_item.tpl index c9ac20c89..4b973bf93 100644 --- a/view/theme/dispy/wall_item.tpl +++ b/view/theme/dispy/wall_item.tpl @@ -15,44 +15,45 @@
{{ if $item.location }}$item.location {{ endif }}
-
- {{ if $item.lock }}
$item.lock
- {{ else }}
{{ endif }} -
- {{ if $item.star }} - - - {{ endif }} - - {{ if $item.vote }} - - {{ endif }} - - {{ if $item.filer }} - - {{ endif }} - - {{ if $item.plink }} - - {{ endif }} - {{ if $item.edpost }} - - {{ endif }} - -
- {{ if $item.drop.dropping }}{{ endif }} -
- {{ if $item.drop.dropping }}{{ endif }} + +
-
$item.title
diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl index b44ea78fd..0d11da271 100755 --- a/view/theme/testbubble/jot-header.tpl +++ b/view/theme/testbubble/jot-header.tpl @@ -304,6 +304,41 @@ function initEditor(cb) { } } } + + function itemFiler(id) { + + var bordercolor = $("input").css("border-color"); + + $.get('filer/', function(data){ + $.fancybox(data); + $("#id_term").keypress(function(){ + $(this).css("border-color",bordercolor); + }) + $("#select_term").change(function(){ + $("#id_term").css("border-color",bordercolor); + }) + + $("#filer_save").click(function(e){ + e.preventDefault(); + reply = $("#id_term").val(); + if(reply && reply.length) { + commentBusy = true; + $('body').css('cursor', 'wait'); + $.get('filer/' + id + '?term=' + reply); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,3000); + liking = 1; + $.fancybox.close(); + } else { + $("#id_term").css("border-color","#FF0000"); + } + return false; + }); + }); + + } + + function jotClearLocation() { $('#jot-coord').val('');