mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Frontend inline-editing preference added.
This commit is contained in:
@@ -1189,6 +1189,13 @@ $text .= "
|
|||||||
".r_userclass('post_script',$pref['post_script'],'off','nobody,member,admin,main,classes')."
|
".r_userclass('post_script',$pref['post_script'],'off','nobody,member,admin,main,classes')."
|
||||||
<div class='smalltext field-help'>".PRFLAN_216."</div>
|
<div class='smalltext field-help'>".PRFLAN_216."</div>
|
||||||
</td>
|
</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for='filter-script'>".PRFLAN_217.":</label></td>
|
<td><label for='filter-script'>".PRFLAN_217.":</label></td>
|
||||||
|
@@ -150,6 +150,7 @@
|
|||||||
<core name="image_post_class">0</core>
|
<core name="image_post_class">0</core>
|
||||||
<core name="image_preload">0</core>
|
<core name="image_preload">0</core>
|
||||||
<core name="img_import_resize">1200x800</core>
|
<core name="img_import_resize">1200x800</core>
|
||||||
|
<core name="inline_editing">255</core>
|
||||||
<core name="inputdate">%A, %d %b, %Y</core>
|
<core name="inputdate">%A, %d %b, %Y</core>
|
||||||
<core name="inputtime">%I:%M %p</core>
|
<core name="inputtime">%I:%M %p</core>
|
||||||
<core name="install_date">1251664949</core>
|
<core name="install_date">1251664949</core>
|
||||||
|
@@ -99,6 +99,7 @@ class e_parse_shortcode
|
|||||||
protected $wrapperDebugDone = array(); // Flag to avoid repetition of debug info.
|
protected $wrapperDebugDone = array(); // Flag to avoid repetition of debug info.
|
||||||
protected $sc_style = array(); // Former $sc_style global variable. Internally used - performance reasons
|
protected $sc_style = array(); // Former $sc_style global variable. Internally used - performance reasons
|
||||||
protected $editableCodes = array(); // Array of editable shortcode data.
|
protected $editableCodes = array(); // Array of editable shortcode data.
|
||||||
|
protected $editableActive = false;
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
@@ -111,6 +112,13 @@ class e_parse_shortcode
|
|||||||
$this->loadPluginSCFiles();
|
$this->loadPluginSCFiles();
|
||||||
//$this->loadCoreShortcodes(); DEPRECATED
|
//$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)
|
private function makeEditable($text, $code)
|
||||||
{
|
{
|
||||||
|
if($this->editableActive === false)
|
||||||
|
{
|
||||||
|
return $text; // unchanged.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$lcode = strtolower($code);
|
$lcode = strtolower($code);
|
||||||
|
|
||||||
if(empty($code)
|
if(empty($code)
|
||||||
|
@@ -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_266", "When logged out, which page should the user be directed to?");
|
||||||
define("PRFLAN_267", "Emailing method");
|
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.");
|
||||||
|
|
||||||
?>
|
|
@@ -365,12 +365,12 @@ $(document).ready(function()
|
|||||||
|
|
||||||
var t = $(this).nextAll(".field-help");
|
var t = $(this).nextAll(".field-help");
|
||||||
|
|
||||||
var placement = 'top';
|
var placement = 'bottom';
|
||||||
|
|
||||||
/* if($(this).is("textarea"))
|
if($(this).is("textarea"))
|
||||||
{
|
{
|
||||||
var placement = 'top';
|
var placement = 'top';
|
||||||
}*/
|
}
|
||||||
|
|
||||||
var custplace = $(t).attr('data-placement'); // ie top|left|bottom|right
|
var custplace = $(t).attr('data-placement'); // ie top|left|bottom|right
|
||||||
|
|
||||||
|
@@ -924,7 +924,7 @@ $(document).ready(function()
|
|||||||
|
|
||||||
if(pos === undefined)
|
if(pos === undefined)
|
||||||
{
|
{
|
||||||
pos = 'top';
|
pos = 'bottom';
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).tooltip({opacity:1.0, fade:true, placement: pos, container: 'body'});
|
$(this).tooltip({opacity:1.0, fade:true, placement: pos, container: 'body'});
|
||||||
|
Reference in New Issue
Block a user