Merge pull request #239 from git-marijus/master
make empty notes saveable as well
This commit is contained in:
commit
06c81e189f
@ -49,6 +49,7 @@ function get_features() {
|
||||
array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on')),
|
||||
array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity')),
|
||||
array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships')),
|
||||
array('suggest', t('Suggest Channels'), t('Show channel suggestions')),
|
||||
),
|
||||
|
||||
// Item tools
|
||||
|
@ -57,6 +57,9 @@ function widget_collections($args) {
|
||||
|
||||
function widget_suggestions($arr) {
|
||||
|
||||
if((! local_user()) || (! feature_enabled(local_user(),'suggest')))
|
||||
return '';
|
||||
|
||||
require_once('include/socgraph.php');
|
||||
|
||||
$r = suggestion_query(local_user(),get_observer_hash(),0,20);
|
||||
@ -143,7 +146,7 @@ function widget_notes($arr) {
|
||||
if(! feature_enabled(local_user(),'private_notes'))
|
||||
return '';
|
||||
|
||||
$text = htmlspecialchars(get_pconfig(local_user(),'notes','text'));
|
||||
$text = get_pconfig(local_user(),'notes','text');
|
||||
|
||||
$o = replace_macros(get_markup_template('notes.tpl'), array(
|
||||
'$banner' => t('Notes'),
|
||||
|
@ -6,7 +6,7 @@ function notes_init(&$a) {
|
||||
logger('mod_notes: ' . print_r($_REQUEST,true));
|
||||
|
||||
$ret = array('success' => true);
|
||||
if($_REQUEST['note_text']) {
|
||||
if($_REQUEST['note_text'] || $_REQUEST['note_text'] == '') {
|
||||
$body = escape_tags($_REQUEST['note_text']);
|
||||
set_pconfig(local_user(),'notes','text',$body);
|
||||
}
|
||||
|
110
view/css/widgets.css
Normal file
110
view/css/widgets.css
Normal file
@ -0,0 +1,110 @@
|
||||
.widget {
|
||||
padding: 8px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* suggest */
|
||||
|
||||
.suggest-widget-more {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* follow */
|
||||
|
||||
#side-follow-url {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#side-follow-submit {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
/* notes */
|
||||
|
||||
#note-text {
|
||||
width: 190px;
|
||||
max-width: 190px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
#note-save {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* saved searches */
|
||||
|
||||
.saved-search-li {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.saved-search-li i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.saved-search-li:hover i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.savedsearchterm {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* fileas */
|
||||
|
||||
.fileas-ul li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.fileas-link {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.fileas-all {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
/* posted date */
|
||||
|
||||
#datebrowse-sidebar select {
|
||||
width: 190px;
|
||||
max-width: 190px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
/* categories */
|
||||
|
||||
.categories-ul li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.categories-link {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.categories-all {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
/* group */
|
||||
|
||||
#group-sidebar {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#sidebar-group-list .icon, #sidebar-group-list .iconspacer {
|
||||
display: inline-block;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
#sidebar-group-list li {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.groupsideedit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.group-edit-icon {
|
||||
opacity: 0;
|
||||
}
|
@ -13,6 +13,7 @@ head_add_css('library/colorbox/colorbox.css');
|
||||
// head_add_css('library/font_awesome/css/font-awesome.min.css');
|
||||
head_add_css('view/css/conversation.css');
|
||||
head_add_css('view/css/bootstrap-red.css');
|
||||
head_add_css('view/css/widgets.css');
|
||||
|
||||
head_add_js('js/jquery.js');
|
||||
head_add_js('library/bootstrap/js/bootstrap.min.js');
|
||||
|
@ -327,11 +327,8 @@ footer {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#group-sidebar {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.group-selected, .nets-selected, .fileas-selected, .categories-selected, .search-selected, .active {
|
||||
/*TODO: we should use one class for all this, nets-selected probably obsolete */
|
||||
.group-selected, /* .nets-selected, */ .fileas-selected, .categories-selected, .search-selected, .active {
|
||||
color: #444444 !important;
|
||||
}
|
||||
|
||||
@ -671,36 +668,6 @@ footer {
|
||||
box-shadow: $shadowpx $shadowpx $shadowpx 0 #444444;
|
||||
}
|
||||
|
||||
|
||||
#datebrowse-sidebar select {
|
||||
margin-left: 25px;
|
||||
border-radius: $radiuspx;
|
||||
-moz-border-radius: $radiuspx;
|
||||
opacity: 0.3;
|
||||
filter:alpha(opacity=30);
|
||||
}
|
||||
|
||||
#datebrowse-sidebar select:hover {
|
||||
opacity: 1.0;
|
||||
filter:alpha(opacity=100);
|
||||
}
|
||||
|
||||
#posted-date-selector {
|
||||
margin-left: 30px !important;
|
||||
margin-top: 5px !important;
|
||||
margin-right: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
#posted-date-selector:hover {
|
||||
box-shadow: 4px 4px 3px 0 #444444;
|
||||
margin-left: 25px !important;
|
||||
margin-top: 0px !important;
|
||||
margin-right: 5px !important;
|
||||
margin-bottom: 5px !important;
|
||||
|
||||
}
|
||||
|
||||
#side-bar-photos-albums {
|
||||
margin-top: 15px;
|
||||
}
|
||||
@ -767,27 +734,12 @@ footer {
|
||||
|
||||
#netsearch-box { margin-bottom: 5px; }
|
||||
|
||||
#sidebar-group-list ul {
|
||||
/* might be obsolete
|
||||
.nets-ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#sidebar-group-list .icon, #sidebar-group-list .iconspacer {
|
||||
display: inline-block;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
#sidebar-group-list li,
|
||||
.saved-search-li {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
|
||||
.nets-ul, .fileas-ul, .categories-ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.nets-ul li, .fileas-ul li, .categories-ul li {
|
||||
.nets-ul li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@ -797,45 +749,17 @@ footer {
|
||||
.nets-all {
|
||||
margin-left: 42px;
|
||||
}
|
||||
|
||||
.fileas-link, .categories-link {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.fileas-all, .categories-all {
|
||||
margin-left: 0px;
|
||||
}
|
||||
*/
|
||||
|
||||
#search-save {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.groupsideedit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#saved-search-ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.saved-search-li i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.saved-search-li:hover i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.savedsearchterm {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
#side-follow-wrapper {
|
||||
margin-top: 20px;
|
||||
}
|
||||
#side-follow-url, #side-peoplefind-url {
|
||||
|
||||
#side-peoplefind-url {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@ -851,7 +775,7 @@ footer {
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
|
||||
#side-follow-submit, #side-peoplefind-submit {
|
||||
#side-peoplefind-submit {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
@ -860,7 +784,7 @@ footer {
|
||||
}
|
||||
|
||||
|
||||
.widget, .pmenu {
|
||||
.pmenu {
|
||||
border-bottom: 1px solid #eec;
|
||||
padding: 8px;
|
||||
margin-top: 5px;
|
||||
@ -1679,12 +1603,6 @@ div.jGrowl div.info {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#datebrowse-sidebar select {
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.jslider .jslider-scale ins {
|
||||
color: #333;
|
||||
font-size: $body_font_size;
|
||||
@ -2255,11 +2173,6 @@ text-decoration: none;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.group-edit-icon,
|
||||
.savedsearchdrop {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.admin-icons {
|
||||
color: $toolicon_colour;
|
||||
margin-right: 10px;
|
||||
@ -2395,8 +2308,6 @@ img.mail-list-sender-photo {
|
||||
max-width: $converse_width;
|
||||
}
|
||||
|
||||
/* conv_item */
|
||||
|
||||
.wall-item-content-wrapper {
|
||||
border-radius: $radiuspx;
|
||||
background-color: $item_colour;
|
||||
@ -2500,8 +2411,6 @@ img.mail-list-sender-photo {
|
||||
color: $toolicon_colour;
|
||||
}
|
||||
|
||||
/* comment_item */
|
||||
|
||||
.my-comment-photo {
|
||||
border-radius: $radiuspx;
|
||||
-moz-border-radius: $radiuspx;
|
||||
@ -2538,14 +2447,40 @@ img.mail-list-sender-photo {
|
||||
.comment-edit-text-full {
|
||||
color: black;
|
||||
}
|
||||
.suggest-widget-more { margin-top: 10px; }
|
||||
|
||||
/* widgets */
|
||||
|
||||
.widget {
|
||||
border-bottom: 1px solid #eec;
|
||||
-moz-border-radius: $radiuspx;
|
||||
-webkit-border-radius: $radiuspx;
|
||||
border-radius: $radiuspx;
|
||||
}
|
||||
|
||||
#note-text {
|
||||
width: 190px;
|
||||
max-width: 190px;
|
||||
height: 150px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: $radiuspx;
|
||||
-moz-border-radius: $radiuspx;
|
||||
}
|
||||
#note-save { margin-top: 10px; }
|
||||
|
||||
#saved-search-ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.fileas-ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#datebrowse-sidebar select {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: $radiuspx;
|
||||
-moz-border-radius: $radiuspx;
|
||||
}
|
||||
|
||||
.categories-ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#sidebar-group-list ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
@ -1,13 +1,10 @@
|
||||
<div class="widget">
|
||||
<script>
|
||||
function notePost() {
|
||||
$('#note-rotator').spin('tiny');
|
||||
$.post('notes', { 'note_text' : $('#note-text').val() },function(data) { $('#note-rotator').spin(false); });
|
||||
}
|
||||
$("#note-text").live('input paste',function(e){
|
||||
$.post('notes', { 'note_text' : $('#note-text').val() });
|
||||
});
|
||||
</script>
|
||||
|
||||
<h3>{{$banner}}</h3>
|
||||
<textarea name="note_text" id="note-text">{{$text}}</textarea>
|
||||
<input type="submit" name="submit" id="note-save" value="{{$save}}" onclick="notePost(); return true;">
|
||||
<div id="note-rotator"></div>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<ul id="saved-search-ul">
|
||||
{{foreach $saved as $search}}
|
||||
<li id="search-term-{{$search.id}}" class="saved-search-li clear">
|
||||
<a title="{{$search.delete}}" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="{{$search.dellink}}"><i id="dropicon-saved-search-term-{{$search.id}}" class="icon-remove drop-icons iconspacer savedsearchdrop" ></i></a>
|
||||
<a title="{{$search.delete}}" onclick="return confirmDelete();" id="drop-saved-search-term-{{$search.id}}" href="{{$search.dellink}}"><i id="dropicon-saved-search-term-{{$search.id}}" class="icon-remove drop-icons iconspacer" ></i></a>
|
||||
<a id="saved-search-term-{{$search.id}}" class="savedsearchterm{{if $search.selected}} search-selected{{/if}}" href="{{$search.srchlink}}">{{$search.displayterm}}</a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
|
@ -29,13 +29,7 @@
|
||||
<div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
|
||||
<div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
|
||||
<div class="wall-item-title-end"></div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body}}
|
||||
<div class="body-tag">
|
||||
{{foreach $item.tags as $tag}}
|
||||
<span class='tag'>{{$tag}}</span>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body}}</div>
|
||||
</div>
|
||||
<div class="wall-item-tools" id="wall-item-tools-{{$item.id}}">
|
||||
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$item.id}}" >
|
||||
|
Reference in New Issue
Block a user