Permalink
Browse files

Merge branch '9.1'

  • Loading branch information...
michelerota committed Sep 20, 2017
2 parents 059ea75 + 1643f23 commit 6cb9bd0fd6bac3de18e8976e574ca95858e1dd89
View
@@ -126,6 +126,12 @@ public function run()
/** @var IndexPage $indexPage */
$indexPage = new $indexPageClass($this);
$default_destination = Config::getGlobal('default_destination');
if(is_array($default_destination)) {
$indexPage->setDefaultDestination($default_destination);
}
$indexPage->generate();
}
}
View
@@ -18,7 +18,9 @@ public static function init()
// Include the defaults
$defaultConfig = self::getConfigValues(__DIR__.'/../Resources/config/atk.php');
foreach ($defaultConfig as $key => $value) {
self::$s_globals[$key] = $value;
if(!array_key_exists($key, self::$s_globals)) {
self::$s_globals[$key] = $value;
}
}
// Get the application config
@@ -468,6 +468,7 @@ protected function renderAdditionField($record, $fieldprefix, $mode)
$relation->addOnChangeHandler("ATK.ManyToManySelectRelation.add(el, '{$url}', {$hasPositionAttribute});");
$relation->setNoneLabel($this->text('select_none_obligatory'));
unset($record[$relation->fieldName()]);
$result = $relation->edit($record, $fieldprefix, $mode);
if ($result == $this->text('select_none_obligatory')) {
$result = '';
@@ -966,7 +966,7 @@ public function _getSelectLink($selname, $filter)
$linkname = Tools::atktext('select_a');
}
$result .= Tools::href(Tools::dispatch_url($this->m_destination, 'select', ['atkfilter' => $filter, 'atktarget' => $atktarget]),
$result .= Tools::href(Tools::dispatch_url($this->m_destination, 'select', ['atkfilter' => $filter ?: 'true', 'atktarget' => $atktarget]),
$linkname, SessionManager::SESSION_NESTED, $this->m_autocomplete_saveform, 'class="atkmanytoonerelation atkmanytoonerelation-link"');
return $result;
@@ -1632,7 +1632,7 @@ public function createFilter($record, $mode)
*/
public function isSelectableRecord($record = [], $mode = '')
{
if ($record[$this->fieldName()] == null) {
if (!isset($record[$this->fieldName()]) || $record[$this->fieldName()] == null) {
return false;
}
@@ -451,6 +451,11 @@
'indexPage' => Sintattica\Atk\Ui\IndexPage::class,
/*
* ['Module.Node', 'action']
*/
'default_destination' => null,
/************************** MENU *********************************/
'menu' => Sintattica\Atk\Core\Menu::class,
@@ -43,8 +43,9 @@ ATK.FormSubmit = {
// call global submit function, which doesn't get called automatically
// when we call entryform.submit manually.
ATK.globalSubmit(document.entryform, standardSubmit);
document.entryform.submit();
var entryForm = jQuery("#entryform");
ATK.globalSubmit(entryForm, standardSubmit);
entryForm.submit();
},
preGlobalSubmit: function (formEl, bag, standardSubmit) {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -14,6 +14,7 @@ ATK.ManyToManySelectRelation = {
jQuery.post(url, params, function (responseText) {
li.before(responseText);
li.find('select.ManyToOneRelation').empty();
jQuery('<div>').html(responseText).find("script").each(function () {
var text = jQuery(this).text();
if(text) {
@@ -9448,6 +9448,13 @@ span.form-control-static {
.fieldset-form-group-field > div, .fieldset-form-group-field > span {
display: inline-block; }
.atkfieldset .form-control-static {
padding-top: 0;
min-height: inherit; }
.atkfieldset label.control-label {
padding-top: 0; }
.error {
color: #A94442; }
@@ -9465,9 +9472,7 @@ span.form-control-static {
.atkmessages_failure,
.atkmessages_warning {
margin-bottom: 1px;
padding: 3px;
padding-left: 6px;
padding-right: 6px; }
padding: 3px 6px; }
.atkmessages_general {
background-color: yellow;
@@ -9487,9 +9492,7 @@ span.form-control-static {
.atkmessages_failure {
background-color: #ff0000;
color: #fff;
padding: 3px;
padding-left: 6px;
padding-right: 6px; }
padding: 3px 6px; }
.red {
color: #9a1010; }
@@ -9508,9 +9511,10 @@ span.form-control-static {
.atkAttrRowHidden {
display: none !important; }
.atkfieldset > .fieldset-form-group, .atkfieldset > .fieldset-form-group > div {
display: inline;
vertical-align: middle; }
.atkfieldset > .fieldset-form-group,
.atkfieldset > .fieldset-form-group > div,
.atkfieldset > .fieldset-form-group input[type="file"] {
display: inline; }
.atkfieldset label {
font-weight: normal; }

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -15,15 +15,6 @@ module.exports = function (grunt) {
cwd: 'bower_components/font-awesome-sass/assets/fonts/',
src: ['**'],
dest: '../public/fonts/'
},
{
expand: true,
cwd: 'bower_components/smartmenus/src/addons/bootstrap/',
src: ['**/*.css'],
dest: 'bower_components/smartmenus/scss/',
rename: function (dest, src) {
return dest + '_' + src.replace(/\.css$/, ".scss");
}
}
]
}
@@ -22,6 +22,6 @@
"jquery": "2.2.4",
"select2": "4.0.3",
"select2-bootstrap-theme": "0.1.0-beta.8",
"smartmenus": "1.0.0",
"smartmenus": "1.1.0",
}
}
@@ -56,6 +56,15 @@ span.form-control-static {
display: inline-block;
}
.atkfieldset .form-control-static {
padding-top: 0;
min-height: inherit;
}
.atkfieldset label.control-label {
padding-top: 0;
}
.error {
color: #A94442;
}
@@ -76,9 +85,7 @@ span.form-control-static {
.atkmessages_failure,
.atkmessages_warning {
margin-bottom: 1px;
padding: 3px;
padding-left: 6px;
padding-right: 6px;
padding: 3px 6px;
}
.atkmessages_general {
@@ -103,9 +110,7 @@ span.form-control-static {
.atkmessages_failure {
background-color: #ff0000;
color: #fff;
padding: 3px;
padding-left: 6px;
padding-right: 6px;
padding: 3px 6px;
}
.red {
@@ -130,9 +135,12 @@ span.form-control-static {
display: none !important;
}
.atkfieldset > .fieldset-form-group, .atkfieldset > .fieldset-form-group > div {
.atkfieldset > .fieldset-form-group,
.atkfieldset > .fieldset-form-group > div,
.atkfieldset > .fieldset-form-group input[type="file"]
{
display: inline;
vertical-align: middle;
// vertical-align: middle;
}
.atkfieldset label {
@@ -2,10 +2,9 @@
@import "../bower_components/bootstrap-sass/assets/stylesheets/bootstrap";
@import "../bower_components/font-awesome-sass/assets/stylesheets/font-awesome";
@import "../bower_components/smartmenus/scss/jquery.smartmenus.bootstrap";
@import "../bower_components/smartmenus/src/addons/bootstrap/jquery.smartmenus.bootstrap";
@import "../bower_components/select2/src/scss/core";
@import "../bower_components/select2-bootstrap-theme/src/select2-bootstrap";
//@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic&subset=latin,latin-ext");
@import "ColorPickerAttribute";
@import "DateAttribute";

0 comments on commit 6cb9bd0

Please sign in to comment.