예제 #1
0
 public static function lesscall()
 {
     T3::import('core/less');
     $result = array();
     try {
         T3Less::compileAll();
         $result['successful'] = JText::_('T3_MSG_COMPILE_SUCCESS');
     } catch (Exception $e) {
         $result['error'] = JText::sprintf('T3_MSG_COMPILE_FAILURE', $e->getMessage());
     }
     echo json_encode($result);
 }
예제 #2
0
파일: action.php 프로젝트: Tommar/remate
 public static function lesscall()
 {
     T3::import('core/less');
     $input = JFactory::getApplication()->input;
     $result = array();
     try {
         T3Less::compileAll($input->get('theme', ''));
         $result['successful'] = JText::_('T3_MSG_COMPILE_SUCCESS');
     } catch (Exception $e) {
         $result['error'] = JText::sprintf('T3_MSG_COMPILE_FAILURE', $e->__toString());
     }
     echo json_encode($result);
 }
예제 #3
0
파일: theme.php 프로젝트: Tommar/vino2
 /**
  *
  * Clone Profile
  */
 public static function duplicate($path)
 {
     $theme = JFactory::getApplication()->input->getCmd('theme');
     $from = JFactory::getApplication()->input->getCmd('from');
     $result = array();
     if (empty($theme) || empty($from)) {
         return self::error(JText::_('T3_TM_INVALID_DATA_TO_SAVE'));
     }
     $source = $path . '/less/themes/' . $from;
     if (!JFolder::exists($source)) {
         return self::error(JText::sprintf('T3_TM_NOT_FOUND', $from));
     }
     $dest = $path . '/less/themes/' . $theme;
     if (JFolder::exists($dest)) {
         return self::error(JText::sprintf('T3_TM_EXISTED', $theme));
     }
     $result = array();
     if (@JFolder::copy($source, $dest) == true) {
         $result['success'] = JText::_('T3_TM_CLONE_SUCCESSFULLY');
         $result['theme'] = $theme;
         $result['reset'] = true;
         $result['type'] = 'duplicate';
     } else {
         return self::error(JText::_('T3_TM_OPERATION_FAILED'));
     }
     //LessHelper::compileForTemplate(T3_TEMPLATE_PATH , $theme);
     T3::import('core/less');
     T3Less::compileAll($theme);
     return self::response($result);
 }