1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Frontend inline-editing preference added.

This commit is contained in:
Cameron 2016-06-09 16:44:40 -07:00
parent 7fdb27510f
commit a4203b72c7
6 changed files with 29 additions and 6 deletions

View File

@ -1189,6 +1189,13 @@ $text .= "
".r_userclass('post_script',$pref['post_script'],'off','nobody,member,admin,main,classes')."
<div class='smalltext field-help'>".PRFLAN_216."</div>
</td>
</tr>
<tr>
<td><label for='inline-editing'>".PRFLAN_268.":</label></td>
<td>
".$frm->userclass('inline_editing',$pref['inline_editing'],'off','nobody,admin,main,classes,no-excludes')."
<div class='smalltext field-help'>".PRFLAN_269."</div>
</td>
</tr>
<tr>
<td><label for='filter-script'>".PRFLAN_217.":</label></td>

View File

@ -150,6 +150,7 @@
<core name="image_post_class">0</core>
<core name="image_preload">0</core>
<core name="img_import_resize">1200x800</core>
<core name="inline_editing">255</core>
<core name="inputdate">%A, %d %b, %Y</core>
<core name="inputtime">%I:%M %p</core>
<core name="install_date">1251664949</core>

View File

@ -99,6 +99,7 @@ class e_parse_shortcode
protected $wrapperDebugDone = array(); // Flag to avoid repetition of debug info.
protected $sc_style = array(); // Former $sc_style global variable. Internally used - performance reasons
protected $editableCodes = array(); // Array of editable shortcode data.
protected $editableActive = false;
function __construct()
{
@ -111,6 +112,13 @@ class e_parse_shortcode
$this->loadPluginSCFiles();
//$this->loadCoreShortcodes(); DEPRECATED
$editableActivePref = e107::getPref('inline_editing',255);
if(check_class($editableActivePref))
{
$this->editableActive = true;
}
}
/**
@ -1420,6 +1428,12 @@ class e_parse_shortcode
*/
private function makeEditable($text, $code)
{
if($this->editableActive === false)
{
return $text; // unchanged.
}
$lcode = strtolower($code);
if(empty($code)

View File

@ -285,5 +285,6 @@ define("PRFLAN_265", "Frontpage is splash page (membersonly.php)");
define("PRFLAN_266", "When logged out, which page should the user be directed to?");
define("PRFLAN_267", "Emailing method");
define("PRFLAN_268", "Frontend Inline-Editing");
define("PRFLAN_269", "Admins with this userclass (and the appropriate admin permissions) will be able to edit html directly via the frontend area.");
?>

View File

@ -74,7 +74,7 @@ $(document).ready(function()
var pos = $(this).attr('data-placement');
if(!pos)
{
pos = 'top';
pos = 'top';
}
$(this).tooltip({opacity:1.0,fade:true, placement: pos});
@ -365,12 +365,12 @@ $(document).ready(function()
var t = $(this).nextAll(".field-help");
var placement = 'top';
var placement = 'bottom';
/* if($(this).is("textarea"))
if($(this).is("textarea"))
{
var placement = 'top';
}*/
}
var custplace = $(t).attr('data-placement'); // ie top|left|bottom|right

View File

@ -924,7 +924,7 @@ $(document).ready(function()
if(pos === undefined)
{
pos = 'top';
pos = 'bottom';
}
$(this).tooltip({opacity:1.0, fade:true, placement: pos, container: 'body'});