- Bootstraps export
This commit is contained in:
@ -66,7 +66,8 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
'assets/css/src/newsletter_editor/newsletter_editor.styl',
|
'assets/css/src/newsletter_editor/newsletter_editor.styl',
|
||||||
'assets/css/src/public.styl',
|
'assets/css/src/public.styl',
|
||||||
'assets/css/src/rtl.styl',
|
'assets/css/src/rtl.styl',
|
||||||
'assets/css/src/import.styl'
|
'assets/css/src/import.styl',
|
||||||
|
'assets/css/src/export.styl'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_exec(join(' ', array(
|
$this->_exec(join(' ', array(
|
||||||
|
22
assets/js/src/export/export.js
Normal file
22
assets/js/src/export/export.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
define(
|
||||||
|
[
|
||||||
|
'underscore',
|
||||||
|
'jquery',
|
||||||
|
'mailpoet',
|
||||||
|
'handlebars',
|
||||||
|
'select2'
|
||||||
|
],
|
||||||
|
function (
|
||||||
|
_,
|
||||||
|
jQuery,
|
||||||
|
MailPoet,
|
||||||
|
Handlebars
|
||||||
|
) {
|
||||||
|
if (!jQuery("#mailpoet_subscribers_export").length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace MailPoet\Config;
|
namespace MailPoet\Config;
|
||||||
|
|
||||||
use \MailPoet\Import\BootstrapMenu;
|
|
||||||
use \MailPoet\Models\Segment;
|
use \MailPoet\Models\Segment;
|
||||||
use \MailPoet\Models\Setting;
|
use \MailPoet\Models\Setting;
|
||||||
use \MailPoet\Models\Form;
|
use \MailPoet\Models\Form;
|
||||||
@ -86,6 +85,14 @@ class Menu {
|
|||||||
'mailpoet-import',
|
'mailpoet-import',
|
||||||
array($this, 'import')
|
array($this, 'import')
|
||||||
);
|
);
|
||||||
|
add_submenu_page(
|
||||||
|
'mailpoet',
|
||||||
|
__('Export'),
|
||||||
|
__('Export'),
|
||||||
|
'manage_options',
|
||||||
|
'mailpoet-export',
|
||||||
|
array($this, 'export')
|
||||||
|
);
|
||||||
// add_submenu_page(
|
// add_submenu_page(
|
||||||
// 'mailpoet',
|
// 'mailpoet',
|
||||||
// __('Newsletter editor'),
|
// __('Newsletter editor'),
|
||||||
@ -229,11 +236,15 @@ class Menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function import() {
|
function import() {
|
||||||
$import = new BootstrapMenu();
|
$import = new \MailPoet\Import\BootstrapMenu();
|
||||||
$data = $import->bootstrap();
|
$data = $import->bootstrap();
|
||||||
echo $this->renderer->render('import.html', $data);
|
echo $this->renderer->render('import.html', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function export() {
|
||||||
|
echo $this->renderer->render('export.html');
|
||||||
|
}
|
||||||
|
|
||||||
function formEditor() {
|
function formEditor() {
|
||||||
$id = (isset($_GET['id']) ? (int)$_GET['id'] : 0);
|
$id = (isset($_GET['id']) ? (int)$_GET['id'] : 0);
|
||||||
$form = Form::findOne($id);
|
$form = Form::findOne($id);
|
||||||
|
11
lib/Export/BootstrapMenu.php
Normal file
11
lib/Export/BootstrapMenu.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace MailPoet\Export;
|
||||||
|
|
||||||
|
class BootstrapMenu {
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function bootstrap() {
|
||||||
|
}
|
||||||
|
}
|
16
lib/Export/Export.php
Normal file
16
lib/Export/Export.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
namespace MailPoet\Export;
|
||||||
|
|
||||||
|
class Export {
|
||||||
|
public function __construct($data) {
|
||||||
|
$this->profilerStart = microtime(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function process() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function timeExecution() {
|
||||||
|
$profilerEnd = microtime(true);
|
||||||
|
return ($profilerEnd - $this->profilerStart) / 60;
|
||||||
|
}
|
||||||
|
}
|
9
lib/Router/Export.php
Normal file
9
lib/Router/Export.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
namespace MailPoet\Router;
|
||||||
|
|
||||||
|
if(!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
|
class Export {
|
||||||
|
function process($data) {
|
||||||
|
}
|
||||||
|
}
|
15
views/export.html
Normal file
15
views/export.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<% extends 'layout.html' %>
|
||||||
|
|
||||||
|
<% block content %>
|
||||||
|
<div id="mailpoet_subscribers_export" class="wrap">
|
||||||
|
<h2 class="title"><%= __('Export') %></h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= stylesheet('export.css') %>
|
||||||
|
|
||||||
|
<%= localize({
|
||||||
|
}) %>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
</script>
|
||||||
|
<% endblock %>
|
@ -96,6 +96,7 @@ config.push(_.extend({}, baseConfig, {
|
|||||||
'forms/forms.jsx',
|
'forms/forms.jsx',
|
||||||
'settings/tabs.js',
|
'settings/tabs.js',
|
||||||
'import/import.js',
|
'import/import.js',
|
||||||
|
'export/export.js'
|
||||||
'helpscout'
|
'helpscout'
|
||||||
],
|
],
|
||||||
form_editor: [
|
form_editor: [
|
||||||
|
Reference in New Issue
Block a user