Commits

Hisateru Tanaka committed 0ef81de Merge

Merge

  • Participants
  • Parent commits daa498e, 97b0957
  • Branches translation-ja

Comments (0)

Files changed (3)

File app/protected/core/models/GlobalMetadata.php

             );
             return $metadata;
         }
+
+        /**
+         * Check if default metadata are changed
+         * @param string $className
+         * @return boolean
+         */
+        public static function isClassMetadataSavedInDatabase($className)
+        {
+            try
+            {
+                $globalMetadata = GlobalMetadata::getByClassName($className);
+                $isClassMetadataSavedInDatabase = true;
+            }
+            catch (NotFoundException $e)
+            {
+                $isClassMetadataSavedInDatabase = false;
+            }
+            return $isClassMetadataSavedInDatabase;
+        }
     }
 ?>

File app/protected/core/rules/MixedDateTimeTypesSearchFormAttributeMappingRules.php

                 {
                     $firstDateValue        = static::resolveValueDataForBetweenIntoUsableFirstDateValue($value);
                     $secondDateValue       = static::resolveValueDataForBetweenIntoUsableSecondDateValue($value);
-                    $greaterThanValue      = DateTimeUtil::convertDateIntoTimeZoneAdjustedDateTimeBeginningOfDay($firstDateValue);
-                    $lessThanValue         = DateTimeUtil::convertDateIntoTimeZoneAdjustedDateTimeEndOfDay($secondDateValue);
+                    if($firstDateValue == null)
+                    {
+                        $greaterThanValue  = null;
+                    }
+                    else
+                    {
+                        $greaterThanValue  = DateTimeUtil::convertDateIntoTimeZoneAdjustedDateTimeBeginningOfDay($firstDateValue);
+                    }
+                    if($secondDateValue == null)
+                    {
+                        $lessThanValue     = null;
+                    }
+                    else
+                    {
+                        $lessThanValue     = DateTimeUtil::convertDateIntoTimeZoneAdjustedDateTimeEndOfDay($secondDateValue);
+                    }
                     $attributeAndRelations = array(array($realAttributeName, null, 'greaterThanOrEqualTo', $greaterThanValue, true),
                                                    array($realAttributeName, null, 'lessThanOrEqualTo',    $lessThanValue, true));
                 }

File app/protected/extensions/amcharts/AmChartMaker.php

                             5 => '["#262877", "#5979cd"]',
                 );
             $this->addChartProperties('fontFamily',                 '"Arial"');
-            $this->addChartProperties('color',                      '"#545454"');
+            $this->addChartProperties('color',                      "'#545454'");
             $this->addChartProperties('lineColor',                  '"#545454"');
             $this->addValueAxisProperties('axisColor',              '"#545454"');
             $this->addValueAxisProperties('gridColor',              '"#545454"');
             }
             elseif ($this->type === "Donut2D")
             {
+                $this->addChartProperties('color',                  "'#A39595'");
                 $this->addChartProperties('sequencedAnimation',     true);
                 $this->addChartProperties('startEffect',            "'elastic'");
                 $this->addChartProperties('innerRadius',            "'30%'");
                 $this->addChartProperties('startDuration',          2);
                 $this->addChartProperties('labelRadius',            15);
                 $this->addChartProperties('usePrefixes',            true);
+                $this->addChartProperties('radius',                 "'45%'");
+                $this->addChartProperties('labelRadius',            -55);
+                $this->addChartProperties('labelText',              "'[[title]]<br>[[percents]]%'");
+                $this->addChartProperties('pullOutRadius',          "'0%'");
+                $this->addChartProperties('startDuration',          0);
                 $this->chartIsPie = true;
             }
             elseif ($this->type === "Pie2D")
             {
+                $this->addChartProperties('color',                  "'#A39595'");
                 $this->addChartProperties('outlineColor',           "'#FFFFFF'");
                 $this->addChartProperties('outlineAlpha',           0.8);
                 $this->addChartProperties('outlineThickness',       2);
                 $this->addChartProperties('usePrefixes',            true);
+                $this->addChartProperties('radius',                 "'45%'");
+                $this->addChartProperties('labelRadius',            -55);
+                $this->addChartProperties('labelText',              "'[[title]]<br>[[percents]]%'");
+                $this->addChartProperties('labelTickColor',         "'#000000'");
+                $this->addChartProperties('pullOutRadius',          "'0%'");
+                $this->addChartProperties('startDuration',          0);
                 $this->chartIsPie = true;
             }
             elseif ($this->type === "Pie3D")
             {
+                $this->addChartProperties('color',                  "'#A39595'");
                 $this->addChartProperties('outlineColor',           "'#FFFFFF'");
                 $this->addChartProperties('outlineAlpha',           0.8);
                 $this->addChartProperties('outlineThickness',       2);
                 $this->addChartProperties('usePrefixes',            true);
+                $this->addChartProperties('radius',                 "'45%'");
+                $this->addChartProperties('labelRadius',            -55);
+                $this->addChartProperties('labelText',              "'[[title]]<br>[[percents]]%'");
+                $this->addChartProperties('labelTickColor',         "'#FFFFFF'");
+                $this->addChartProperties('pullOutRadius',          "'0%'");
+                $this->addChartProperties('startDuration',          0);
                 $this->makeChart3d();
                 $this->chartIsPie = true;
             }