Commit b6da5b49 authored by Malcolm Blaney's avatar Malcolm Blaney

Added initial support for photo posts, which can be added via the

Writer module and will be rendered as a lightbox in the Post module.
Post module now also sends webmentions when a post is removed.
Removed code that was used to publish to Facebook, as that can no
longer be done via brid.dy. Control bar now has either static or
sticky positioning, as neither of these values obscure the rest of
the page. SimplePie Parser bug fix, an extra array was being added
to the Media RSS format which wasn't required.
parent 7b94ae6c
Pipeline #35825954 passed with stage
in 1 minute and 21 seconds
This diff is collapsed.
...@@ -153,9 +153,9 @@ class Writer extends Base { ...@@ -153,9 +153,9 @@ class Writer extends Base {
'<div class="arrow"></div>' . '<div class="arrow"></div>' .
'<ul class="menu">' . '<ul class="menu">' .
'<li id="writer-options-title"><div>Add a title</div></li>' . '<li id="writer-options-title"><div>Add a title</div></li>' .
'<li id="writer-options-photo"><div>Add a photo</div></li>' .
$author . $author .
'<li id="writer-options-twitter"><div>Send to Twitter</div></li>' . '<li id="writer-options-twitter"><div>Send to Twitter</div></li>' .
'<li id="writer-options-facebook"><div>Send to Facebook</div></li>'.
'</ul>' . '</ul>' .
'</div>' . '</div>' .
$writer_settings . $writer_settings .
...@@ -179,9 +179,11 @@ class Writer extends Base { ...@@ -179,9 +179,11 @@ class Writer extends Base {
'<button class="writer-remove-twitter">remove</button>' . '<button class="writer-remove-twitter">remove</button>' .
'<span class="writer-twitter">Send to Twitter</span>' . '<span class="writer-twitter">Send to Twitter</span>' .
'</div>' . '</div>' .
'<div class="writer-options-facebook hidden">' . '<div class="writer-options-photo hidden">' .
'<button class="writer-remove-facebook">remove</button>' . '<button class="writer-remove-photo">remove</button>' .
'<span class="writer-facebook">Send to Facebook</span>' . '<span class="writer-photo">Add photos to display as an album:</span>' .
'<button id="writer-photo-browse">browse</button>' .
'<div id="writer-photo-selected"></div>' .
'</div>' . '</div>' .
$designate_page; $designate_page;
} }
...@@ -262,7 +264,6 @@ class Writer extends Base { ...@@ -262,7 +264,6 @@ class Writer extends Base {
'"",".writer-options-title","padding","2px"', '"",".writer-options-title","padding","2px"',
'"",".writer-options-author","padding","2px"', '"",".writer-options-author","padding","2px"',
'"",".writer-options-twitter","padding","2px"', '"",".writer-options-twitter","padding","2px"',
'"",".writer-options-facebook","padding","2px"',
'"",".writer-menu-wrapper","opacity",".8"', '"",".writer-menu-wrapper","opacity",".8"',
'"",".writer-menu-wrapper","position","absolute"', '"",".writer-menu-wrapper","position","absolute"',
'"",".writer-menu-wrapper","left","-3px"', '"",".writer-menu-wrapper","left","-3px"',
...@@ -295,15 +296,19 @@ class Writer extends Base { ...@@ -295,15 +296,19 @@ class Writer extends Base {
'"",".writer-remove-title","float","left"', '"",".writer-remove-title","float","left"',
'"",".writer label[for=writer-title]","width","4em"', '"",".writer label[for=writer-title]","width","4em"',
'"",".writer label[for=writer-title]","float","none"', '"",".writer label[for=writer-title]","float","none"',
'"",".writer label[for=writer-title]","text-align","right"',
'"",".writer label[for=writer-title]","margin-right","5px"',
'"",".writer label[for=writer-title]","display",' . '"",".writer label[for=writer-title]","display",' .
'"inline-block"', '"inline-block"',
'"",".writer label[for=writer-author]","width","4em"', '"",".writer label[for=writer-author]","width","4em"',
'"",".writer label[for=writer-author]","float","none"', '"",".writer label[for=writer-author]","float","none"',
'"",".writer label[for=writer-author]","text-align","right"',
'"",".writer label[for=writer-author]","margin-right","5px"',
'"",".writer label[for=writer-author]","display",' . '"",".writer label[for=writer-author]","display",' .
'"inline-block"', '"inline-block"',
'"",".writer-twitter","margin-left","10px"', '"",".writer-twitter","margin-left","10px"',
'"",".writer-facebook","margin-left","10px"', '"","#writer-follow","float","right"',
'"","#writer-follow","float","right"']; '"","#writer-photo-selected img","height","50px"'];
$this->AddSiteStyle($site_style); $this->AddSiteStyle($site_style);
return $this->Dependencies(['post']); return $this->Dependencies(['post']);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -157,7 +157,7 @@ dobrado.control.notifications=function(action){if(notificationsRequested){return ...@@ -157,7 +157,7 @@ dobrado.control.notifications=function(action){if(notificationsRequested){return
notificationsRequested=true;$.post('/php/request.php',{request:'notification',action:'new',url:location.href,token:dobrado.token},function(response){if(dobrado.checkResponseError(response,'notifications callback')){return;} notificationsRequested=true;$.post('/php/request.php',{request:'notification',action:'new',url:location.href,token:dobrado.token},function(response){if(dobrado.checkResponseError(response,'notifications callback')){return;}
var notification=JSON.parse(response);if(notification.content!==''){if($('.notifications').length===0){$('<div></div>').addClass('notifications').appendTo('body');} var notification=JSON.parse(response);if(notification.content!==''){if($('.notifications').length===0){$('<div></div>').addClass('notifications').appendTo('body');}
$('.notifications').html(notification.content);$('.notification-menu-wrapper .menu').html('');showNotifications();} $('.notifications').html(notification.content);$('.notification-menu-wrapper .menu').html('');showNotifications();}
notificationsRequested=false;});};dobrado.control.settingsCallback=function(settings){if(settings.position){var position=settings.position==='scroll'?'absolute':'sticky';$('.control').css('position',position);if(position==='absolute'){$('.control').addClass('transparency');}} notificationsRequested=false;});};dobrado.control.settingsCallback=function(settings){if(settings.position){var position=settings.position==='scroll'?'static':'sticky';$('.control').css('position',position);}
if(settings.displayMessageButton==='hidden'){$('.control .message-button').remove();if($('.dobrado-mobile').is(':visible')){$('.notification-menu-wrapper').css('left','85px');$('.notification-count').css('left','106px');} if(settings.displayMessageButton==='hidden'){$('.control .message-button').remove();if($('.dobrado-mobile').is(':visible')){$('.notification-menu-wrapper').css('left','85px');$('.notification-count').css('left','106px');}
else{$('.notification-menu-wrapper').css('left','221px');$('.notification-count').css('left','248px');}} else{$('.notification-menu-wrapper').css('left','221px');$('.notification-count').css('left','248px');}}
if(settings.displayToolsButton==='hidden'){$('.control-button.tools').hide();}};}());(function($){var min=Math.min;var max=Math.max;var round=Math.floor;var isStr=function(v){return $.type(v)==='string';};var runPluginCallbacks=function(Instance,a_fn){if($.isArray(a_fn)){for(var i=0,c=a_fn.length;i<c;i++){var fn=a_fn[i];try{if(isStr(fn)) if(settings.displayToolsButton==='hidden'){$('.control-button.tools').hide();}};}());(function($){var min=Math.min;var max=Math.max;var round=Math.floor;var isStr=function(v){return $.type(v)==='string';};var runPluginCallbacks=function(Instance,a_fn){if($.isArray(a_fn)){for(var i=0,c=a_fn.length;i<c;i++){var fn=a_fn[i];try{if(isStr(fn))
......
...@@ -1179,13 +1179,8 @@ if (!this.dobrado.control) { ...@@ -1179,13 +1179,8 @@ if (!this.dobrado.control) {
// The words 'scroll' and 'fixed' are used on the settings page so that // The words 'scroll' and 'fixed' are used on the settings page so that
// position css values make more sense to users. 'sticky' is a better // position css values make more sense to users. 'sticky' is a better
// option than 'fixed' because it doesn't obscure the top of the page. // option than 'fixed' because it doesn't obscure the top of the page.
var position = settings.position === 'scroll' ? 'absolute' : 'sticky'; var position = settings.position === 'scroll' ? 'static' : 'sticky';
$('.control').css('position', position); $('.control').css('position', position);
if (position === 'absolute') {
// It might still be useful to add some transparency to the control bar
// when absolute, but make it optional via css.
$('.control').addClass('transparency');
}
} }
if (settings.displayMessageButton === 'hidden') { if (settings.displayMessageButton === 'hidden') {
// The button is removed rather than hidden because the tool bar // The button is removed rather than hidden because the tool bar
......
...@@ -744,7 +744,7 @@ class SimplePie_Parser ...@@ -744,7 +744,7 @@ class SimplePie_Parser
$item['description'] = array(array('data' => '')); $item['description'] = array(array('data' => ''));
} }
$items[] = array('child' => array('' => $item, $items[] = array('child' => array('' => $item,
SIMPLEPIE_NAMESPACE_MEDIARSS => array('content' => array($media)))); SIMPLEPIE_NAMESPACE_MEDIARSS => array('content' => $media)));
} }
} }
// Mimic RSS data format when storing microformats. // Mimic RSS data format when storing microformats.
......
...@@ -233,7 +233,6 @@ class Control extends Base { ...@@ -233,7 +233,6 @@ class Control extends Base {
'"",".control","z-index","50"', '"",".control","z-index","50"',
'"",".control","height","48px"', '"",".control","height","48px"',
'"",".control","display","none"', '"",".control","display","none"',
'"",".control.transparency","opacity","0.8"',
'"",".control .wrapper","height","38px"', '"",".control .wrapper","height","38px"',
'"",".control .wrapper","padding-top","8px"', '"",".control .wrapper","padding-top","8px"',
'"",".control-button","margin-left","7px"', '"",".control-button","margin-left","7px"',
...@@ -329,14 +328,12 @@ class Control extends Base { ...@@ -329,14 +328,12 @@ class Control extends Base {
'"",".control .info","position","absolute"', '"",".control .info","position","absolute"',
'"",".control .info","width","18em"', '"",".control .info","width","18em"',
'"",".control .info","padding","8px"', '"",".control .info","padding","8px"',
'"",".control .info .ui-icon-info","float","left"',
'"",".control .info .message","padding-left","0.2em"', '"",".control .info .message","padding-left","0.2em"',
'"",".control .info .message","font-family","Helvetica"', '"",".control .info .message","font-family","Helvetica"',
'"",".control .error .message","font-family","Helvetica"', '"",".control .error .message","font-family","Helvetica"',
'"",".control .error","position","absolute"', '"",".control .error","position","absolute"',
'"",".control .error","width","18em"', '"",".control .error","width","18em"',
'"",".control .error","padding","8px"', '"",".control .error","padding","8px"',
'"",".control .error .ui-icon-alert","float","left"',
'"",".control .error .message","padding-left","0.2em"']; '"",".control .error .message","padding-left","0.2em"'];
$this->AddSiteStyle($site_style); $this->AddSiteStyle($site_style);
$this->AddSettingTypes(['"control","position","scroll,fixed","radio",' . $this->AddSettingTypes(['"control","position","scroll,fixed","radio",' .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment