Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap UI #555

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
416d8c6
Add bootstrap/gulp & style magmi_config_setup.php
bpodwinski Sep 7, 2017
233d116
style header & style magmi_utilities.php
bpodwinski Sep 8, 2017
6969048
added Sublime Text files to .gitignore
FlavienGARCIA Sep 8, 2017
cd25f87
multi column & header/footer design
bpodwinski Sep 11, 2017
169d7ab
large style & rework footer/header
bpodwinski Sep 11, 2017
47b9df7
rework plugininfo style
bpodwinski Sep 11, 2017
0f76e04
add humans.txt
bpodwinski Sep 12, 2017
09a9634
Bootstrap CSS to SASS & Bootstrap loaded via npm
bpodwinski Sep 12, 2017
8ccbc23
scss to sass & footer re-rework
bpodwinski Sep 12, 2017
bc3b3b3
update .gitignore
bpodwinski Sep 12, 2017
e298121
fix footer url
bpodwinski Sep 12, 2017
ff18e58
add menu
bpodwinski Sep 12, 2017
cca1d73
added scrollspy && style one column
bpodwinski Sep 12, 2017
174e44a
fix menu
bpodwinski Sep 13, 2017
5917a91
style page importing
bpodwinski Sep 13, 2017
f30b69d
Fix icon button
bpodwinski Sep 13, 2017
2367f1d
fix error
bpodwinski Sep 13, 2017
182e1aa
style error button
bpodwinski Sep 13, 2017
3cd5087
Added Content-Security-Policy
bpodwinski Sep 15, 2017
942b39d
Rework Magmi Profile
bpodwinski Sep 15, 2017
0fc6d50
Mini fix
bpodwinski Sep 15, 2017
b84a4f2
Fix pluginconfpanel
bpodwinski Sep 15, 2017
8a59e96
Added back button in main menu
bpodwinski Sep 15, 2017
f71191b
Cleaning!
bpodwinski Sep 16, 2017
bf2ace0
style overlay
bpodwinski Sep 27, 2017
f06effc
Cleaning!
bpodwinski Sep 27, 2017
2ce96a0
Add php-cs-fixer changes
tmotyl Jun 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .csscomb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "single",
"sort-order-fallback": "abc",
"space-before-colon": "",
"space-after-colon": " ",
"space-before-combinator": " ",
"space-after-combinator": " ",
"space-between-declarations": "\n",
"space-before-opening-brace": " ",
"space-after-opening-brace": "\n",
"space-after-selector-delimiter": "\n",
"space-before-selector-delimiter": "",
"space-before-closing-brace": "\n",
"strip-spaces": true,
"tab-size": true,
"unitless-zero": true,
"vendor-prefix-align": true
}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
.idea
sftp-config.json
*.sublime-project
*.sublime-workspace
/magmi/state/*
!/magmi/state/dummy.txt
/node_modules/*
!/node_modules/bootstrap
!/node_modules/font-awesome
!/node_modules/jquery
/node_modules/jquery/*
!/node_modules/jquery/dist
!/node_modules/popper.js
/node_modules/popper.js/*
!/node_modules/popper.js/dist
.php-cs-fixer.cache
.php_cs.cache
File renamed without changes.
72 changes: 72 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
'use strict';

var gulp = require('gulp');
var plugins = require('gulp-load-plugins')({
DEBUG: false,
pattern: '*'
});

// Variables
var url = 'localhost';
var magmi = 'magmi';

var paths = {
img: magmi + '/web/images',
js: magmi + '/web/js',
sass: magmi + '/web/sass',
css: magmi + '/web/css'
};

// BrowserSync task
gulp.task('browserSync', ['sass:dev'], function() {
plugins.browserSync.init({
proxy: url,
reloadOnRestart: true,
open: false,
rewriteRules: [{
match: /Content-Security-Policy/,
fn: function (match) {
return "DISABLED-Content-Security-Policy";
}
}]
});
gulp.watch(paths.sass + '/**/*.sass', ['sass']);
gulp.watch(paths.js + '/**/*.js').on('change', plugins.browserSync.reload);
gulp.watch(magmi + '/**/*.php').on('change', plugins.browserSync.reload);
});

// Sass dev task
gulp.task('sass:dev', function() {
gulp.src(paths.sass + '/**/*.sass')
.pipe(plugins.plumber({
errorHandler: function (error) {
console.log(error.message);
this.emit('end');
}}))
.pipe(plugins.sass.sync().on('error', plugins.sass.logError))
.on('error', function(err) {})
.pipe(plugins.csscomb())
.pipe(gulp.dest(paths.css))
.pipe(plugins.browserSync.stream());
});

// Sass prod task
gulp.task('sass:prod', function() {
gulp.src(paths.sass + '/**/*.sass')
.pipe(plugins.plumber({
errorHandler: function (error) {
console.log(error.message);
this.emit('end');
}}))
.pipe(plugins.sass.sync().on('error', plugins.sass.logError))
.on('error', function(err) {})
.pipe(plugins.csscomb())
.pipe(plugins.cleanCss())
.pipe(gulp.dest(paths.css));
});

// Dev task
gulp.task('dev', ['browserSync']);

// Default task
gulp.task('default', ['sass:prod']);
24 changes: 24 additions & 0 deletions magmi/inc/license.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="modal fade" id="license" tabindex="-1" role="dialog" aria-labelledby="MIT OSL License" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">MIT OSL License</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Copyright (C) 2012 by Dweeves (S.BRACQUEMONT)</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
70 changes: 27 additions & 43 deletions magmi/plugins/base/datasources/csv/options_panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

<div class="csvmode"></div>

<ul class="formline">
<li class="label">CSV import mode</li>
<li class="value"><select name="CSV:importmode" id="CSV:importmode">
<label for="CSV:importmode">CSV import mode</label>
<select name="CSV:importmode" id="CSV:importmode" class="form-control">
<option value="local"
<?php if ($this->getParam("CSV:importmode", "local") == "local") {
?>
Expand All @@ -23,61 +22,46 @@
}?>>Remote</option>
</select>

</ul>

<div id="localcsv"
<?php if ($this->getParam("CSV:importmode", "local") == "remote") {
?>
style="display: none" <?php
}?>>
<ul class="formline">
<li class="label">CSVs base directory</li>
<li class="value"><input type="text" name="CSV:basedir"
id="CSV:basedir"
value="<?php echo $this->getParam("CSV:basedir", "var/import")?>">
<div class="fieldinfo">Relative paths are relative to magento base
directory , absolute paths will be used as is</div></li>
</ul>
<ul class="formline">
<li class="label">File to import:</li>
<li class="value" id="csvds_filelist">
<?php echo $this->getOptionsPanel("csvds_filelist.php")->getHtml(); ?>
</li>
</ul>

<label for="CSV:basedir">CSVs base directory</label>
<input type="text" name="CSV:basedir"
id="CSV:basedir" class="form-control"
value="<?php echo $this->getParam("CSV:basedir", "var/import")?>">
<p class="fieldinfo">Relative paths are relative to magento base directory , absolute paths will be used as is.</p>

<div class="value" id="csvds_filelist">
<span for="CSV:basedir">File to import:</span>
<?php echo $this->getOptionsPanel("csvds_filelist.php")->getHtml(); ?>
</div>
</div>

<div id="remotecsv"
<?php if ($this->getParam("CSV:importmode", "local") == "local") {
?>
style="display: none" <?php
}?>>
<ul class="formline">
<li class="label">Remote CSV url</li>
<li class="value"><input type="text" name="CSV:remoteurl"
id="CSV:remoteurl"
value="<?php echo $this->getParam("CSV:remoteurl", "")?>"
style="width: 400px"><input type="checkbox"
id="CSV:forcedl" name="CSV:forcedl"
<?php if ($this->getParam("CSV:forcedl", false) == true) {
?>
checked="checked" <?php
}?>>Force Download</li>
</ul>

<label for="CSV:remoteurl">Remote CSV url</label>
<input type="text" name="CSV:remoteurl" id="CSV:remoteurl" class="form-control" value="<?php echo $this->getParam("CSV:remoteurl", "")?>">

<label class="form-check-label">
<input type="checkbox" id="CSV:forcedl" class="form-check-input" name="CSV:forcedl" <?php if ($this->getParam("CSV:forcedl", false) == true) {?> checked="checked" <?php }?>>Force Download
</label>

<div id="remotecookie">
<ul class="formline">
<li class="label">HTTP Cookie</li>
<li class="value"><input type="text" name="CSV:remotecookie"
id="CSV:remotecookie"
value="<?php echo $this->getParam("CSV:remotecookie", "")?>"
style="width: 400px"></li>
</ul>
<label for="CSV:remotecookie">HTTP Cookie</label>
<input type="text" name="CSV:remotecookie" id="CSV:remotecookie" class="form-control" value="<?php echo $this->getParam("CSV:remotecookie", "")?>">
</div>
<input type="checkbox" id="CSV:remoteauth" name="CSV:remoteauth"
<?php if ($this->getParam("CSV:remoteauth", false) == true) {
?>
checked="checked" <?php
}?>>authentication needed

<label class="form-check-label">
<input type="checkbox" id="CSV:remoteauth" class="form-check-input" name="CSV:remoteauth"
<?php if ($this->getParam("CSV:remoteauth", false) == true) { ?> checked="checked" <?php }?>>Authentication needed
</label>
<div id="remoteauth"
<?php if ($this->getParam("CSV:remoteauth", false) == false) {
?>
Expand Down
2 changes: 1 addition & 1 deletion magmi/web/ajax_gettime.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

echo htmlspecialchars($_REQUEST["prefix"]).":".strftime("%c");
echo htmlspecialchars($_REQUEST['prefix']) . ':' . strftime('%c');
24 changes: 12 additions & 12 deletions magmi/web/ajax_pluginconf.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?php

require_once("security.php");
require_once("../inc/magmi_defs.php");
require_once("magmi_pluginhelper.php");
require_once("magmi_web_utils.php");
$pltype = $_REQUEST["plugintype"];
$plclass = $_REQUEST["pluginclass"];
$profile = $_REQUEST["profile"];
require_once('security.php');
require_once('../inc/magmi_defs.php');
require_once('magmi_pluginhelper.php');
require_once('magmi_web_utils.php');
$pltype = $_REQUEST['plugintype'];
$plclass = $_REQUEST['pluginclass'];
$profile = $_REQUEST['profile'];
$file = null;

if (isset($_REQUEST['file'])) {
$file = $_REQUEST['file'];
}
if ($profile == "") {
if ($profile == '') {
$profile = null;
}

if (isset($_REQUEST["engine"])) {
$engdef = explode(":", $_REQUEST["engine"]);
if (isset($_REQUEST['engine'])) {
$engdef = explode(':', $_REQUEST['engine']);
$engine_name = basename($engdef[0]);
$engine_class = $engdef[1];
require_once("../engines/$engine_name.php");
require_once('../engines/$engine_name.php');
$enginst = new $engine_class();
$enginst->initialize();
} else {
Expand Down
8 changes: 4 additions & 4 deletions magmi/web/ajax_readlocalxml.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

require_once("security.php");
require_once("../inc/magmi_config.php");
require_once('security.php');
require_once('../inc/magmi_config.php');
$conf = Magmi_Config::getInstance();
$conf->load();

$selected = $conf->get('DATABASE', 'resource');
$magentoConfig = new SimpleXMLElement(file_get_contents($conf->get('MAGENTO', 'basedir').'/app/etc/local.xml'));
$magentoConfig = new SimpleXMLElement(file_get_contents($conf->get('MAGENTO', 'basedir') . '/app/etc/local.xml'));
foreach ($magentoConfig->global->resources->children() as $resource) {
$name = $resource->getName();
if ($name != 'db') {
echo '<option value="'.$name.'" '.($selected == $name ? 'selected' : '').'>'.$name.'</option>';
echo '<option value="' . $name . '" '. ($selected == $name ? 'selected' : '') . '>' . $name . '</option>';
}
}
8 changes: 4 additions & 4 deletions magmi/web/clearcatalog.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

require_once("security.php");
ini_set("display_errors", 1);
require_once('security.php');
ini_set('display_errors', 1);
try {
require_once(dirname(dirname(__FILE__)) . "/inc/maintenance/clearproducts.php");
require_once(dirname(dirname(__FILE__)) . '/inc/maintenance/clearproducts.php');
$ccutil = new CatalogClearUtility();
$ccutil->connect();
$ccutil->clearProducts();
$ccutil->disconnect();
echo "Catalog Cleared !!!";
echo "Catalog cleared!";
} catch (Exception $e) {
echo $e;
}
Loading