X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   make tpl files in admin open with toggle editor unchecked (https://forum.x-cart.com/showthread.php?t=69972)

keystone 09-11-2014 10:52 AM

make tpl files in admin open with toggle editor unchecked
 
I want to know how to make the .tpl files open up with the "toggle editor" checkbox at the bottom unchecked. The reason is that when I open up the main.css file in content/edit templates, it takes forever and freezes my browser until it is finished opening.

I am doing this in version 4.6.0

I have narrowed the .tpl file I need to edit down to /common_files/admin/main/edit_file.tpl

and I believe it is in this line
Code:

<form action="file_edit.php" method="post" {if $use_edit_area}onsubmit="javascript: if(!$('#edit_area_toggle_checkbox_filebody').prop('checked'))$('#toggle_edit_area').val('Y');"{/if}>

I thought it would be just changing the
Code:

.val('Y') to .val('N')
but that doesn't work. I don't know a lick of javascript so I'm clueless on this one.

Can anyone help?

totaltec 09-11-2014 12:08 PM

Re: make tpl files in admin open with toggle editor unchecked
 
In /common_files/admin/main/edit_file.tpl

Change line: 26
{if $use_edit_area}

to

{if !$use_edit_area}

keystone 09-12-2014 06:15 AM

Re: make tpl files in admin open with toggle editor unchecked
 
Hi Steve, That was close but not quite what what I was looking for. That removed the toggle editor checkbox completely. I would rather have the checkbox there but unchecked by default. That way I can activate the editor if I need it. Do you know how to do that?


All times are GMT -8. The time now is 05:43 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.