From 5d0d83706293a887414528c06a89a71f78df23e1 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 21 Mar 2011 01:27:21 -0300 Subject: [PATCH] Start working on moving all the images to icons and rename them to follow the convention family-image.png. Based on that, the current hardcode maps could be removed. --- mindplot/src/main/javascript/ImageIcon.js | 24 ++++----- .../com/wisemapping/model/IconFamily.java | 1 - .../icons/{face-angel.png => face_angel.png} | Bin .../{face-crying.png => face_crying.png} | Bin .../{face-devilish.png => face_devilish.png} | Bin .../{face-glasses.png => face_glasses.png} | Bin .../icons/{face-grin.png => face_grin.png} | Bin .../icons/{face-kiss.png => face_kiss.png} | Bin .../{face-monkey.png => face_monkey.png} | Bin .../icons/{face-plain.png => face_plain.png} | Bin .../icons/{face-sad.png => face_sad.png} | Bin ...{face-smile-big.png => face_smile-big.png} | Bin .../icons/{face-smile.png => face_smile.png} | Bin .../{face-surprise.png => face_surprise.png} | Bin .../icons/{face-wink.png => face_wink.png} | Bin wise-webapp/src/main/webapp/images/ruby.png | Bin 592 -> 0 bytes wise-webapp/src/main/webapp/images/tick.png | Bin 537 -> 0 bytes .../com/wisemapping/test/model/IconsTest.java | 47 ++++++++++++++++++ .../wisemapping/test/model/ImagesTest.java | 20 -------- 19 files changed, 59 insertions(+), 33 deletions(-) rename wise-webapp/src/main/webapp/icons/{face-angel.png => face_angel.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-crying.png => face_crying.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-devilish.png => face_devilish.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-glasses.png => face_glasses.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-grin.png => face_grin.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-kiss.png => face_kiss.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-monkey.png => face_monkey.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-plain.png => face_plain.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-sad.png => face_sad.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-smile-big.png => face_smile-big.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-smile.png => face_smile.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-surprise.png => face_surprise.png} (100%) rename wise-webapp/src/main/webapp/icons/{face-wink.png => face_wink.png} (100%) delete mode 100755 wise-webapp/src/main/webapp/images/ruby.png delete mode 100755 wise-webapp/src/main/webapp/images/tick.png create mode 100644 wise-webapp/src/test/java/com/wisemapping/test/model/IconsTest.java delete mode 100644 wise-webapp/src/test/java/com/wisemapping/test/model/ImagesTest.java diff --git a/mindplot/src/main/javascript/ImageIcon.js b/mindplot/src/main/javascript/ImageIcon.js index 74de5e14..c1984e4d 100644 --- a/mindplot/src/main/javascript/ImageIcon.js +++ b/mindplot/src/main/javascript/ImageIcon.js @@ -36,7 +36,7 @@ mindplot.ImageIcon = function(iconModel, topic, designer) { var container = new Element('div'); var removeImage = new Element('img'); - removeImage.src = "../icons/bin.png"; + removeImage.src = "../images/bin.png"; removeImage.inject(container); if (!designer._viewMode) @@ -286,17 +286,17 @@ mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_PIN mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_YELLOW] = "../icons/tag_yellow.png"; mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_PURPLE] = "../icons/tag_purple.png"; //FACES -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_ANGEL] = "../icons/face-angel.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_DEVIL] = "../icons/face-devilish.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_GLASSES] = "../icons/face-glasses.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_KISS] = "../icons/face-kiss.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_MONKEY] = "../icons/face-monkey.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_PLAIN] = "../icons/face-plain.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_CRYING] = "../icons/face-crying.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SAD] = "../icons/face-sad.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SMILE] = "../icons/face-smile.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SURPRISE] = "../icons/face-surprise.png"; -mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_WINK] = "../icons/face-wink.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_ANGEL] = "../icons/face-_angel.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_DEVIL] = "../icons/face_devilish.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_GLASSES] = "../icons/face_glasses.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_KISS] = "../icons/face_kiss.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_MONKEY] = "../icons/face_monkey.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_PLAIN] = "../icons/face_plain.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_CRYING] = "../icons/face_crying.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SAD] = "../icons/face_sad.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SMILE] = "../icons/face_smile.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SURPRISE] = "../icons/face_surprise.png"; +mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_WINK] = "../icons/face_wink.png"; //ARROWS mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_ARROW_UP] = "../icons/arrow_up.png"; diff --git a/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java b/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java index 56a6f4bf..84b88ced 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/IconFamily.java @@ -24,7 +24,6 @@ public enum IconFamily { TAG("TAG","tag_"), NUMBER("NUMBER","number_"), SMILEY("FACE","face_"), - FACE_FUNY("FACEFUNY","facefuny_"), ARROW("ARROW","arrow_"), ARROWC("ARROWC","arrowc_"), CONN("CONN","conn_"), diff --git a/wise-webapp/src/main/webapp/icons/face-angel.png b/wise-webapp/src/main/webapp/icons/face_angel.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-angel.png rename to wise-webapp/src/main/webapp/icons/face_angel.png diff --git a/wise-webapp/src/main/webapp/icons/face-crying.png b/wise-webapp/src/main/webapp/icons/face_crying.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-crying.png rename to wise-webapp/src/main/webapp/icons/face_crying.png diff --git a/wise-webapp/src/main/webapp/icons/face-devilish.png b/wise-webapp/src/main/webapp/icons/face_devilish.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-devilish.png rename to wise-webapp/src/main/webapp/icons/face_devilish.png diff --git a/wise-webapp/src/main/webapp/icons/face-glasses.png b/wise-webapp/src/main/webapp/icons/face_glasses.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-glasses.png rename to wise-webapp/src/main/webapp/icons/face_glasses.png diff --git a/wise-webapp/src/main/webapp/icons/face-grin.png b/wise-webapp/src/main/webapp/icons/face_grin.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-grin.png rename to wise-webapp/src/main/webapp/icons/face_grin.png diff --git a/wise-webapp/src/main/webapp/icons/face-kiss.png b/wise-webapp/src/main/webapp/icons/face_kiss.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-kiss.png rename to wise-webapp/src/main/webapp/icons/face_kiss.png diff --git a/wise-webapp/src/main/webapp/icons/face-monkey.png b/wise-webapp/src/main/webapp/icons/face_monkey.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-monkey.png rename to wise-webapp/src/main/webapp/icons/face_monkey.png diff --git a/wise-webapp/src/main/webapp/icons/face-plain.png b/wise-webapp/src/main/webapp/icons/face_plain.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-plain.png rename to wise-webapp/src/main/webapp/icons/face_plain.png diff --git a/wise-webapp/src/main/webapp/icons/face-sad.png b/wise-webapp/src/main/webapp/icons/face_sad.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-sad.png rename to wise-webapp/src/main/webapp/icons/face_sad.png diff --git a/wise-webapp/src/main/webapp/icons/face-smile-big.png b/wise-webapp/src/main/webapp/icons/face_smile-big.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-smile-big.png rename to wise-webapp/src/main/webapp/icons/face_smile-big.png diff --git a/wise-webapp/src/main/webapp/icons/face-smile.png b/wise-webapp/src/main/webapp/icons/face_smile.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-smile.png rename to wise-webapp/src/main/webapp/icons/face_smile.png diff --git a/wise-webapp/src/main/webapp/icons/face-surprise.png b/wise-webapp/src/main/webapp/icons/face_surprise.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-surprise.png rename to wise-webapp/src/main/webapp/icons/face_surprise.png diff --git a/wise-webapp/src/main/webapp/icons/face-wink.png b/wise-webapp/src/main/webapp/icons/face_wink.png similarity index 100% rename from wise-webapp/src/main/webapp/icons/face-wink.png rename to wise-webapp/src/main/webapp/icons/face_wink.png diff --git a/wise-webapp/src/main/webapp/images/ruby.png b/wise-webapp/src/main/webapp/images/ruby.png deleted file mode 100755 index f763a16880751445e3c4a8802a28d3cf8b5787c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 592 zcmV-W0k7R5;7c zlif>`Q5?tj7Yw@ZCMtTF^Q|ZedeJhM%QPCR*bs8V79p$QTo7e94yQNXRs-{0?hOn_-8n0AMO@u1Ts zNl8QzJs1#rz%RBt?ux>l+amAvh+J!{$lkaqv}+Erb-6j2xp>K4GLQnNB*W`hFg*?P z^AL@~(h~Z+wfcWEXHqV^Tq-#z$7Y#o0;yFxA!00F}F2dX# zjE$iOgT#G4*1TR6kB1Gnn@>$meCh2a>c5YuIvFn-R2W@>4@M*m@-|jiDV?b)bccgA zyPfsMM!rjy>+1O2)5Eg29Z_*2p&qGnmS!OH?vZ(4>QB01d>j%9n4QINxkyT(Dos?I zjaWF$*IQmh`SF-?xU%xMEfjq1=6qY*g&lgG_cXv$BGoIWyfO5 zp>pdV*O+y=&6@N2WWFo(%RtT`Q(H^6zn^a%epE~Kx^mEJ{c8`luC$nc*z9j|4Ms8aJK-laHs{AQG2a)rMyf zFQK~pm1x3+7!nu%-M`k}``c>^00{o_1pjWJUTfl8mg=3qGEl8H@}^@w`VUx0_$uy4 z2FhRqKX}xI*?Tv1DJd8z#F#0c%*~rM30HE1@2o5m~}ZyoWhqv>ql{V z1ZGE0lgcoK^lx+eqc*rAX1Ky;Xx3U%u#zG!m-;eD1Qsn@kf3|F9qz~|95=&g3(7!X zB}JAT>RU;a%vaNOGnJ%e1=K6eAh43c(QN8RQ6~GP%O}Jju$~Ld*%`mO1p iconByFamily = MindmapIcons.getIconByFamily(IconFamily.BULLET); + Assert.assertEquals(iconByFamily.size(), 7); + } + + + @Test + void checkPngFile() throws IllegalAccessException { + + IconFamily[] values = IconFamily.values(); + for (IconFamily family : values) { + final List iconByFamily = MindmapIcons.getIconByFamily(family); + for (MindmapIcon mindmapIcon : iconByFamily) { + final String pngName = mindmapIcon.getId() + ".png"; + File file = new File("src/main/webapp/icons/", pngName); + if (!file.exists()) { + System.err.println("File not found:" + pngName); + } +// else { +// System.err.println("Found:" + pngName); +// } + + } + + + } + + + } + + +} diff --git a/wise-webapp/src/test/java/com/wisemapping/test/model/ImagesTest.java b/wise-webapp/src/test/java/com/wisemapping/test/model/ImagesTest.java deleted file mode 100644 index e01a518e..00000000 --- a/wise-webapp/src/test/java/com/wisemapping/test/model/ImagesTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.wisemapping.test.model; - - -import com.wisemapping.model.IconFamily; -import com.wisemapping.model.MindmapIcon; -import com.wisemapping.model.MindmapIcons; -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.util.List; - -@Test -public class ImagesTest { - @Test - void checkImagesByFamily() throws IllegalAccessException { - List iconByFamily = MindmapIcons.getIconByFamily(IconFamily.BULLET); - Assert.assertEquals(iconByFamily.size(), 7); - } - -}