Magdev_Tinycon - Version 1.0.4

Version Notes

code-cleanup, documentation, translation and some style fixes

Download this release

Release Info

Developer Marco Graetsch
Extension Magdev_Tinycon
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Magdev/Tinycon/Block/Script.php CHANGED
@@ -28,18 +28,28 @@
28
  */
29
 
30
  /**
31
- * Insert Tinycon javascript
32
  *
33
  * @author magdev
34
  */
35
  class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
36
  {
 
 
 
 
 
37
  public function isEnabled()
38
  {
39
  return Mage::getStoreConfig('design/tinycon/enabled');
40
  }
41
 
42
 
 
 
 
 
 
43
  public function getWidth()
44
  {
45
  if (!$this->getData('width')) {
@@ -49,6 +59,11 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
49
  }
50
 
51
 
 
 
 
 
 
52
  public function getHeight()
53
  {
54
  if (!$this->getData('height')) {
@@ -58,6 +73,11 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
58
  }
59
 
60
 
 
 
 
 
 
61
  public function getFont()
62
  {
63
  if (!$this->getData('font')) {
@@ -66,6 +86,12 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
66
  return $this->getData('font');
67
  }
68
 
 
 
 
 
 
 
69
  public function getFontface()
70
  {
71
  if (!$this->getData('fontface')) {
@@ -75,6 +101,11 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
75
  }
76
 
77
 
 
 
 
 
 
78
  public function getFontsize()
79
  {
80
  if (!$this->getData('fontsize')) {
@@ -83,15 +114,26 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
83
  return $this->getData('fontsize');
84
  }
85
 
 
 
 
 
 
 
86
  public function getColor()
87
  {
88
  if (!$this->getData('color')) {
89
- $this->setData('color', (string) Mage::getStoreConfig('design/tinycon/colour'));
90
  }
91
  return $this->getData('color');
92
  }
93
 
94
 
 
 
 
 
 
95
  public function getBackground()
96
  {
97
  if (!$this->getData('background')) {
@@ -101,6 +143,11 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
101
  }
102
 
103
 
 
 
 
 
 
104
  public function getFallback()
105
  {
106
  if (!$this->getData('fallback')) {
@@ -110,6 +157,11 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
110
  }
111
 
112
 
 
 
 
 
 
113
  public function getAbbreviate()
114
  {
115
  if (!$this->getData('abbreviate')) {
@@ -119,6 +171,11 @@ class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
119
  }
120
 
121
 
 
 
 
 
 
122
  public function getCount()
123
  {
124
  if (!$this->getData('count')) {
28
  */
29
 
30
  /**
31
+ * Tinycon javascript block
32
  *
33
  * @author magdev
34
  */
35
  class Magdev_Tinycon_Block_Script extends Mage_Core_Block_Template
36
  {
37
+ /**
38
+ * Check if the module is enabled
39
+ *
40
+ * @return boolean
41
+ */
42
  public function isEnabled()
43
  {
44
  return Mage::getStoreConfig('design/tinycon/enabled');
45
  }
46
 
47
 
48
+ /**
49
+ * Get the width of the bubble
50
+ *
51
+ * @return int
52
+ */
53
  public function getWidth()
54
  {
55
  if (!$this->getData('width')) {
59
  }
60
 
61
 
62
+ /**
63
+ * Get the height of the bubble
64
+ *
65
+ * @return int
66
+ */
67
  public function getHeight()
68
  {
69
  if (!$this->getData('height')) {
73
  }
74
 
75
 
76
+ /**
77
+ * Get the font-def
78
+ *
79
+ * @return string
80
+ */
81
  public function getFont()
82
  {
83
  if (!$this->getData('font')) {
86
  return $this->getData('font');
87
  }
88
 
89
+
90
+ /**
91
+ * Get the font-face
92
+ *
93
+ * @return string
94
+ */
95
  public function getFontface()
96
  {
97
  if (!$this->getData('fontface')) {
101
  }
102
 
103
 
104
+ /**
105
+ * Get the font-size
106
+ *
107
+ * @return int
108
+ */
109
  public function getFontsize()
110
  {
111
  if (!$this->getData('fontsize')) {
114
  return $this->getData('fontsize');
115
  }
116
 
117
+
118
+ /**
119
+ * Get the text-color
120
+ *
121
+ * @return string
122
+ */
123
  public function getColor()
124
  {
125
  if (!$this->getData('color')) {
126
+ $this->setData('color', (string) Mage::getStoreConfig('design/tinycon/color'));
127
  }
128
  return $this->getData('color');
129
  }
130
 
131
 
132
+ /**
133
+ * Get the background-color
134
+ *
135
+ * @return string
136
+ */
137
  public function getBackground()
138
  {
139
  if (!$this->getData('background')) {
143
  }
144
 
145
 
146
+ /**
147
+ * Get the fallback setting
148
+ *
149
+ * @return string|int
150
+ */
151
  public function getFallback()
152
  {
153
  if (!$this->getData('fallback')) {
157
  }
158
 
159
 
160
+ /**
161
+ * Get the abbreviate setting
162
+ *
163
+ * @return boolean
164
+ */
165
  public function getAbbreviate()
166
  {
167
  if (!$this->getData('abbreviate')) {
171
  }
172
 
173
 
174
+ /**
175
+ * Get the current bubble-count
176
+ *
177
+ * @return int
178
+ */
179
  public function getCount()
180
  {
181
  if (!$this->getData('count')) {
app/code/community/Magdev/Tinycon/Model/System/Config/Source/Fallback.php CHANGED
@@ -1,12 +1,38 @@
1
  <?php
2
  /**
3
- ##LICENSE_HEADER##
4
  *
5
- * @author magdev
6
- * @copyright 2013 magdev
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  */
8
 
9
 
 
 
 
 
 
10
  class Magdev_Tinycon_Model_System_Config_Source_Fallback
11
  {
12
  public function toOptionArray()
1
  <?php
2
  /**
3
+ * Copyright (c) 2013 Marco Graetsch
4
  *
5
+ * Permission is hereby granted, free of charge, to any person
6
+ * obtaining a copy of this software and associated documentation
7
+ * files (the "Software"), to deal in the Software without restriction,
8
+ * including without limitation the rights to use, copy, modify, merge,
9
+ * publish, distribute, sublicense, and/or sell copies of the Software,
10
+ * and to permit persons to whom the Software is furnished to do so,
11
+ * subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be
14
+ * included in all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ *
24
+ *
25
+ * @package Magdev_Tinycon
26
+ * @author Marco Graetsch <info@magdev.de>
27
+ * @copyright 2013 Marco Graetsch
28
  */
29
 
30
 
31
+ /**
32
+ * Fallback Source-Model
33
+ *
34
+ * @author magdev
35
+ */
36
  class Magdev_Tinycon_Model_System_Config_Source_Fallback
37
  {
38
  public function toOptionArray()
app/code/community/Magdev/Tinycon/Model/System/Config/Source/Fontface.php CHANGED
@@ -29,7 +29,7 @@
29
 
30
 
31
  /**
32
- * Fontface model
33
  *
34
  * @author magdev
35
  */
@@ -38,8 +38,11 @@ class Magdev_Tinycon_Model_System_Config_Source_Fontface
38
  public function toOptionArray()
39
  {
40
  return array(
41
- array('label' => Mage::helper('tinycon')->__('Arial'), 'value' => 'arial'),
42
- array('label' => Mage::helper('tinycon')->__('Verdana'), 'value' => 'verdana'),
 
 
 
43
  );
44
  }
45
  }
29
 
30
 
31
  /**
32
+ * Fontface Source-Model
33
  *
34
  * @author magdev
35
  */
38
  public function toOptionArray()
39
  {
40
  return array(
41
+ array('label' => Mage::helper('tinycon')->__('Arial'), 'value' => 'Arial'),
42
+ array('label' => Mage::helper('tinycon')->__('Verdana'), 'value' => 'Verdana'),
43
+ array('label' => Mage::helper('tinycon')->__('Georgia'), 'value' => 'Georgia'),
44
+ array('label' => Mage::helper('tinycon')->__('Helvetica'), 'value' => 'Helvetica'),
45
+ array('label' => Mage::helper('tinycon')->__('Times New Roman'), 'value' => '"Times New Roman"'),
46
  );
47
  }
48
  }
app/code/community/Magdev/Tinycon/Model/System/Config/Source/Fontsize.php CHANGED
@@ -29,7 +29,7 @@
29
 
30
 
31
  /**
32
- * Fonsize model
33
  *
34
  * @author magdev
35
  */
@@ -38,11 +38,13 @@ class Magdev_Tinycon_Model_System_Config_Source_Fontsize
38
  public function toOptionArray()
39
  {
40
  return array(
 
41
  array('label' => Mage::helper('tinycon')->__('8px'), 'value' => 8),
42
  array('label' => Mage::helper('tinycon')->__('9px'), 'value' => 9),
43
  array('label' => Mage::helper('tinycon')->__('10px'), 'value' => 10),
44
  array('label' => Mage::helper('tinycon')->__('11px'), 'value' => 11),
45
  array('label' => Mage::helper('tinycon')->__('12px'), 'value' => 12),
 
46
  );
47
  }
48
  }
29
 
30
 
31
  /**
32
+ * Fontsize Source-Model
33
  *
34
  * @author magdev
35
  */
38
  public function toOptionArray()
39
  {
40
  return array(
41
+ array('label' => Mage::helper('tinycon')->__('7px'), 'value' => 7),
42
  array('label' => Mage::helper('tinycon')->__('8px'), 'value' => 8),
43
  array('label' => Mage::helper('tinycon')->__('9px'), 'value' => 9),
44
  array('label' => Mage::helper('tinycon')->__('10px'), 'value' => 10),
45
  array('label' => Mage::helper('tinycon')->__('11px'), 'value' => 11),
46
  array('label' => Mage::helper('tinycon')->__('12px'), 'value' => 12),
47
+ array('label' => Mage::helper('tinycon')->__('13px'), 'value' => 13),
48
  );
49
  }
50
  }
app/code/community/Magdev/Tinycon/etc/adminhtml.xml CHANGED
@@ -38,7 +38,7 @@
38
  <config>
39
  <children>
40
  <tinycon translate="title" module="tinycon">
41
- <title>Tincon</title>
42
  <sort_order>50</sort_order>
43
  </tinycon>
44
  </children>
38
  <config>
39
  <children>
40
  <tinycon translate="title" module="tinycon">
41
+ <title>Tinycon</title>
42
  <sort_order>50</sort_order>
43
  </tinycon>
44
  </children>
app/code/community/Magdev/Tinycon/etc/config.xml CHANGED
@@ -31,7 +31,7 @@
31
  <config>
32
  <modules>
33
  <Magdev_Tinycon>
34
- <version>1.0.3</version>
35
  </Magdev_Tinycon>
36
  </modules>
37
  <global>
@@ -79,10 +79,10 @@
79
  <height>9</height>
80
  <fontsize>10</fontsize>
81
  <fontface>arial</fontface>
82
- <colour>#ffffff</colour>
83
  <background>#618499</background>
84
  <fallback>1</fallback>
85
- <abbreviate>1</abbreviate>
86
  </tinycon>
87
  </design>
88
  </default>
31
  <config>
32
  <modules>
33
  <Magdev_Tinycon>
34
+ <version>1.0.4</version>
35
  </Magdev_Tinycon>
36
  </modules>
37
  <global>
79
  <height>9</height>
80
  <fontsize>10</fontsize>
81
  <fontface>arial</fontface>
82
+ <color>#ffffff</color>
83
  <background>#618499</background>
84
  <fallback>1</fallback>
85
+ <abbreviate>0</abbreviate>
86
  </tinycon>
87
  </design>
88
  </default>
app/code/community/Magdev/Tinycon/etc/system.xml CHANGED
@@ -40,8 +40,8 @@
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
  <fields>
43
- <enabled translate="label comment" module="tinycon">
44
- <label>Enabled</label>
45
  <frontend_type>select</frontend_type>
46
  <source_model>adminhtml/system_config_source_yesno</source_model>
47
  <sort_order>1</sort_order>
@@ -56,7 +56,7 @@
56
  <show_in_default>1</show_in_default>
57
  <show_in_website>1</show_in_website>
58
  <show_in_store>1</show_in_store>
59
- <comment>Default is 7</comment>
60
  </width>
61
  <height translate="label comment" module="tinycon">
62
  <label>Height</label>
@@ -65,20 +65,20 @@
65
  <show_in_default>1</show_in_default>
66
  <show_in_website>1</show_in_website>
67
  <show_in_store>1</show_in_store>
68
- <comment>Default is 9</comment>
69
  </height>
70
  <fontsize translate="label comment" module="tinycon">
71
- <label>Fontsize</label>
72
  <frontend_type>select</frontend_type>
73
  <source_model>tinycon/system_config_source_fontsize</source_model>
74
  <sort_order>25</sort_order>
75
  <show_in_default>1</show_in_default>
76
  <show_in_website>1</show_in_website>
77
  <show_in_store>1</show_in_store>
78
- <comment>Default is 10px</comment>
79
  </fontsize>
80
- <fontface translate="label comment" module="tinycon">
81
- <label>Fontface</label>
82
  <frontend_type>select</frontend_type>
83
  <source_model>tinycon/system_config_source_fontface</source_model>
84
  <sort_order>30</sort_order>
@@ -86,22 +86,21 @@
86
  <show_in_website>1</show_in_website>
87
  <show_in_store>1</show_in_store>
88
  </fontface>
89
- <colour translate="label comment" module="tinycon">
90
- <label>Fontcolor</label>
91
  <frontend_type>text</frontend_type>
92
  <sort_order>35</sort_order>
93
  <show_in_default>1</show_in_default>
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>1</show_in_store>
96
- </colour>
97
- <background translate="label comment" module="tinycon">#549A2F
98
- <label>Background</label>
99
  <frontend_type>text</frontend_type>
100
  <sort_order>40</sort_order>
101
  <show_in_default>1</show_in_default>
102
  <show_in_website>1</show_in_website>
103
  <show_in_store>1</show_in_store>
104
- <comment>Hex-Value or 'transparent'</comment>
105
  </background>
106
  <fallback translate="label comment" module="tinycon">
107
  <label>Use Fallback</label>
@@ -111,6 +110,7 @@
111
  <show_in_default>1</show_in_default>
112
  <show_in_website>1</show_in_website>
113
  <show_in_store>1</show_in_store>
 
114
  </fallback>
115
  <abbreviate translate="label comment" module="tinycon">
116
  <label>Abbreviate long numbers</label>
@@ -120,6 +120,7 @@
120
  <show_in_default>1</show_in_default>
121
  <show_in_website>1</show_in_website>
122
  <show_in_store>1</show_in_store>
 
123
  </abbreviate>
124
  </fields>
125
  </tinycon>
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
  <fields>
43
+ <enabled translate="label" module="tinycon">
44
+ <label>Enable</label>
45
  <frontend_type>select</frontend_type>
46
  <source_model>adminhtml/system_config_source_yesno</source_model>
47
  <sort_order>1</sort_order>
56
  <show_in_default>1</show_in_default>
57
  <show_in_website>1</show_in_website>
58
  <show_in_store>1</show_in_store>
59
+ <comment>Default: 7</comment>
60
  </width>
61
  <height translate="label comment" module="tinycon">
62
  <label>Height</label>
65
  <show_in_default>1</show_in_default>
66
  <show_in_website>1</show_in_website>
67
  <show_in_store>1</show_in_store>
68
+ <comment>Default: 9</comment>
69
  </height>
70
  <fontsize translate="label comment" module="tinycon">
71
+ <label>Font-Size</label>
72
  <frontend_type>select</frontend_type>
73
  <source_model>tinycon/system_config_source_fontsize</source_model>
74
  <sort_order>25</sort_order>
75
  <show_in_default>1</show_in_default>
76
  <show_in_website>1</show_in_website>
77
  <show_in_store>1</show_in_store>
78
+ <comment>Default: 10px</comment>
79
  </fontsize>
80
+ <fontface translate="label" module="tinycon">
81
+ <label>Font-Face</label>
82
  <frontend_type>select</frontend_type>
83
  <source_model>tinycon/system_config_source_fontface</source_model>
84
  <sort_order>30</sort_order>
86
  <show_in_website>1</show_in_website>
87
  <show_in_store>1</show_in_store>
88
  </fontface>
89
+ <color translate="label" module="tinycon">
90
+ <label>Font-Color</label>
91
  <frontend_type>text</frontend_type>
92
  <sort_order>35</sort_order>
93
  <show_in_default>1</show_in_default>
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>1</show_in_store>
96
+ </color>
97
+ <background translate="label" module="tinycon">
98
+ <label>Background-Color</label>
99
  <frontend_type>text</frontend_type>
100
  <sort_order>40</sort_order>
101
  <show_in_default>1</show_in_default>
102
  <show_in_website>1</show_in_website>
103
  <show_in_store>1</show_in_store>
 
104
  </background>
105
  <fallback translate="label comment" module="tinycon">
106
  <label>Use Fallback</label>
110
  <show_in_default>1</show_in_default>
111
  <show_in_website>1</show_in_website>
112
  <show_in_store>1</show_in_store>
113
+ <comment>Enable or force a number in brackets preceding the title for browsers that don't support canvas/dynamic favicons</comment>
114
  </fallback>
115
  <abbreviate translate="label comment" module="tinycon">
116
  <label>Abbreviate long numbers</label>
120
  <show_in_default>1</show_in_default>
121
  <show_in_website>1</show_in_website>
122
  <show_in_store>1</show_in_store>
123
+ <comment>Shrink large numbers to an abbreviated version (i.e. 1000 => 1k)</comment>
124
  </abbreviate>
125
  </fields>
126
  </tinycon>
app/design/frontend/base/default/layout/tinycon.xml CHANGED
@@ -31,11 +31,16 @@
31
  <layout version="0.1.0">
32
  <default>
33
  <reference name="head">
34
- <action method="addJs" ifconfig="design/tinycon/enabled"><script>tinycon/tinycon.min.js</script></action>
 
 
35
  </reference>
36
  <reference name="before_body_end">
37
- <block type="tinycon/Script" name="tinycon_script" template="tinycon/js.phtml"/>
38
- <action method="setChild"><block>tinycon_script</block><name>tinycon_script</name></action>
 
 
 
39
  </reference>
40
  </default>
41
  </layout>
31
  <layout version="0.1.0">
32
  <default>
33
  <reference name="head">
34
+ <action method="addJs" ifconfig="design/tinycon/enabled">
35
+ <script>tinycon/tinycon.min.js</script>
36
+ </action>
37
  </reference>
38
  <reference name="before_body_end">
39
+ <block type="tinycon/script" name="tinycon_script" template="tinycon/script.phtml"/>
40
+ <action method="setChild" ifconfig="design/tinycon/enabled">
41
+ <block>tinycon_script</block>
42
+ <name>tinycon_script</name>
43
+ </action>
44
  </reference>
45
  </default>
46
  </layout>
app/design/frontend/base/default/template/tinycon/{js.phtml → script.phtml} RENAMED
File without changes
app/locale/de_DE/Magdev_Tinycon.csv CHANGED
@@ -1,16 +1,18 @@
1
  "Tinycon","Tinycon"
2
- "Enabled","Aktiviert"
3
  "Width","Breite"
4
  "Height","Höhe"
5
- "Fontsize","Schriftgröße"
6
- "Fontface","Schriftart"
7
- "Fontcolor","Schriftfarbe"
8
- "Background","Hintergrund"
9
- "Hex-Value or 'transparent'","Hex-Wert oder 'transparent'"
10
- "Use Fallback","Fallback aktivieren"
11
- "Default is 7","Standardwert: 7"
12
- "Default is 9","Standardwert: 9"
13
- "Default is 10px","Standardwert: 10px"
14
  "Yes","Ja"
15
  "No","Nein"
 
16
  "Abbreviate long numbers","Große Zahlen abkürzen"
 
 
1
  "Tinycon","Tinycon"
2
+ "Enable","Aktiviert"
3
  "Width","Breite"
4
  "Height","Höhe"
5
+ "Font-Size","Schriftgröße"
6
+ "Font-Face","Schriftart"
7
+ "Font-Color","Schriftfarbe"
8
+ "Background-Color","Hintergrundfarbe"
9
+ "Use Fallback","Fallback verwenden"
10
+ "Default: 7","Standard: 7"
11
+ "Default: 9","Standard: 9"
12
+ "Default: 10px","Standard: 10px"
 
13
  "Yes","Ja"
14
  "No","Nein"
15
+ "Force","Erzwingen"
16
  "Abbreviate long numbers","Große Zahlen abkürzen"
17
+ "Shrink large numbers to an abbreviated version (i.e. 1000 => 1k)","Große Zahlen abkürzen (z.B. 1000 => 1k)"
18
+ "Show a number in brackets preceding the title for browsers that don't support canvas/dynamic favicons","In Browsern ohne Canvas/dynamische Favicons dem Titel eine Zahl in Klammern voranstellen"
js/tinycon/.gitignore ADDED
@@ -0,0 +1 @@
 
1
+ .DS_Store
js/tinycon/README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Tinycon
2
+
3
+ A small library for manipulating the favicon, in particular adding alert bubbles and changing images. Tinycon gracefully falls back to a number in title approach for browers that don't support canvas or dynamic favicons.
4
+
5
+ <img src="https://github.com/tommoor/tinycon/blob/master/examples/screenshot.png?raw=true" />
6
+
7
+ <a href="http://tommoor.github.com/tinycon/">See the Live Demo here.</a>
8
+
9
+ ## Documentation
10
+
11
+ Tinycon adds a single object to the global namespace and does not require initialisation.
12
+
13
+ ### Basic Usage
14
+
15
+ ```javascript
16
+ Tinycon.setBubble(6);
17
+ ```
18
+
19
+ ### Options
20
+
21
+ Tinycon can take a range of options to customise the look
22
+
23
+ * width: the width of the alert bubble
24
+ * height: the height of the alert bubble
25
+ * font: a css string to use for the fontface (recommended to leave this)
26
+ * colour: the foreground font colour
27
+ * background: the alert bubble background colour
28
+ * fallback: should we fallback to a number in brackets for browsers that don't support canvas/dynamic favicons? Boolean, or use the string 'force' to ensure a title update even in supported browsers.
29
+ * abbreviate: should tinycon shrink large numbers such as 1000 to an abbreviated version (1k). Boolean, defaults to true
30
+
31
+ ```javascript
32
+ Tinycon.setOptions({
33
+ width: 7,
34
+ height: 9,
35
+ font: '10px arial',
36
+ colour: '#ffffff',
37
+ background: '#549A2F',
38
+ fallback: true
39
+ });
40
+ ```
41
+
42
+ ## Browser Support
43
+
44
+ Tinycon has been tested to work completely in the following browsers. Older versions may be supported, but haven't been tested:
45
+
46
+ * Chrome 15+
47
+ * Firefox 9+
48
+ * Opera 11+
49
+
50
+ Currently the library degrades to title update:
51
+
52
+ * Internet Explorer 9
53
+ * Safari 5
54
+
55
+
56
+ ## License / Credits
57
+
58
+ Tinycon is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with Tinycon.
59
+ [More Information](http://en.wikipedia.org/wiki/MIT_License)
60
+
61
+ Tinycon was inspired by [Notificon](https://github.com/makeable/Notificon)
62
+
63
+
64
+ ## Download
65
+
66
+ Releases are available for download from
67
+ [GitHub](http://github.com/tommoor/tinycon/downloads).
js/tinycon/examples/favicon.ico ADDED
Binary file
js/tinycon/examples/index.html ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <link rel="icon" href="favicon.ico">
4
+ <title>Tinycon</title>
5
+
6
+ <script src="../tinycon.js"></script>
7
+ <script>
8
+ (function(){
9
+ var count = 0;
10
+ setInterval(function(){
11
+ ++count;
12
+ Tinycon.setBubble(count);
13
+
14
+ }, 1000);
15
+ })();
16
+ </script>
17
+ </head>
18
+ <body>
19
+ </body>
20
+ </html>
js/tinycon/examples/screenshot.png ADDED
Binary file
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magdev_Tinycon</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Display the number of items in cart as favicon bubble</summary>
10
  <description>Display the number of items in cart as favicon bubble using the Tinycon javascript library</description>
11
- <notes>added force-fallback option</notes>
12
  <authors><author><name>Marco Graetsch</name><user>magdev</user><email>info@magdev.de</email></author></authors>
13
  <date>2013-04-01</date>
14
- <time>19:37:16</time>
15
- <contents><target name="magecommunity"><dir name="Magdev"><dir name="Tinycon"><dir name="Block"><file name="Script.php" hash="055a71c4788752f5e5adbf66338e3712"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d2a463dcf40271877a8254b45afaa819"/><file name="config.xml" hash="6481167acb0896b80300ae244c80d0a8"/><file name="system.xml" hash="7dc4624e10de86f9babc2a01c8cb8fb6"/></dir><dir name="Helper"><file name="Data.php" hash="759c93792721a1562813bf6286ae37c7"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Fallback.php" hash="d8788b451ffd3f5d1c461116c141e8cd"/><file name="Fontface.php" hash="e592653dfafd3ea63c7b8fa6ae211fb8"/><file name="Fontsize.php" hash="dff5ddd5fc82f9e8e19f7d44f3bd996b"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magdev_Tinycon.xml" hash="fb42db35e3e733c26b10a91e217deebe"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tinycon.xml" hash="b56e38afc714b192f8ec0c246fe11711"/></dir><dir name="template"><dir name="tinycon"><file name="js.phtml" hash="06b9be966e38f93d1ca9076d60931071"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="tinycon"><file name="tinycon.js" hash="f61e4e95050172b30344b5f2fd51ce2a"/><file name="tinycon.min.js" hash="f9e48e5d4590630acf74b4f0b63e502f"/></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Magdev_Tinycon.csv" hash="428a9c0480ba1ff9b9a00f4d530150d8"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magdev_Tinycon</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Display the number of items in cart as favicon bubble</summary>
10
  <description>Display the number of items in cart as favicon bubble using the Tinycon javascript library</description>
11
+ <notes>code-cleanup, documentation, translation and some style fixes</notes>
12
  <authors><author><name>Marco Graetsch</name><user>magdev</user><email>info@magdev.de</email></author></authors>
13
  <date>2013-04-01</date>
14
+ <time>22:24:57</time>
15
+ <contents><target name="magecommunity"><dir name="Magdev"><dir name="Tinycon"><dir name="Block"><file name="Script.php" hash="113dfcac675a8583e2e21e4a4b17f460"/></dir><dir name="Helper"><file name="Data.php" hash="759c93792721a1562813bf6286ae37c7"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Fallback.php" hash="5d26573b5233f2c91eb156201fe4fe68"/><file name="Fontface.php" hash="8776ed70b1614821533ffb146d463f0c"/><file name="Fontsize.php" hash="662fdbb1c269018c6ce7fba93890ab6e"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="fe5f672f3cbaa34620c84cc95a965ddb"/><file name="config.xml" hash="58affe4784a89445a420da3b0a2bf980"/><file name="system.xml" hash="f2b10bab09f1e8664679b101f031f8c1"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magdev_Tinycon.xml" hash="fb42db35e3e733c26b10a91e217deebe"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tinycon.xml" hash="bc5c0c1f8f74c7b102cf1a9fc90e6996"/></dir><dir name="template"><dir name="tinycon"><file name="script.phtml" hash="06b9be966e38f93d1ca9076d60931071"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="tinycon"><file name="README.md" hash="148ae279e92eff414c87943f0dbe5cf0"/><dir><dir name="examples"><file name="favicon.ico" hash="525a7fec126454bca9be6f95a8521468"/><file name="index.html" hash="51bfd82f696a7154ba717213565c41f9"/><file name="screenshot.png" hash="791025ec0842cd27839e37f1e644c9d9"/></dir></dir><file name="tinycon.js" hash="f61e4e95050172b30344b5f2fd51ce2a"/><file name="tinycon.min.js" hash="f9e48e5d4590630acf74b4f0b63e502f"/><file name=".git" hash="9a0c47e0c320db6e73f72675e75ca725"/><file name=".gitignore" hash="edb274d8c594429b8ccc684d79d771f6"/></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Magdev_Tinycon.csv" hash="3aed3676c6bb3db65fad47b0d70518ef"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php></required></dependencies>
18
  </package>