Index: lams_tool_images/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r2ded08a63789390122f15ab1c3c70075ed0d2a2e -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 2ded08a63789390122f15ab1c3c70075ed0d2a2e) +++ lams_tool_images/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -180,8 +180,16 @@ monitor.summary.th.advancedSettings =Advanced Settings monitor.summary.td.addNotebook =Add Notebook at end of Image Gallery monitor.summary.td.notebookInstructions =Notebook instructions - event.assigment.submit.subject=LAMS: A learner submitted an assigment in a Shared Resources tool event.assigment.submit.body=The learner {0} submitted an assigment in a Shared Resources tool.\n\nThis message was send automatically, following tool's advanced settings. +admin.page.title =Image Gallery Settings +error.required.fields.missing =Missing values, please make sure all required fields are entered. +error.entered.values.not.integers =Entered values should be integers +admin.maximum.dimensions.medium.image =Maximum dimensions of medium image +admin.maximum.dimensions.thumbnail.image =Maximum dimensions of thumbnail image +admin.success =Configuration successfully saved. +admin.return =Return to maintain LAMS +admin.button.save =Save + #======= End labels: Exported 166 labels for en AU ===== Index: lams_tool_images/conf/xdoclet/struts-actions.xml =================================================================== diff -u -r8a7c47632a6a93892f015f068d12adb376c0ae2d -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 8a7c47632a6a93892f015f068d12adb376c0ae2d) +++ lams_tool_images/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -232,6 +232,25 @@ + + + + + + + + + - + @@ -114,11 +114,11 @@
- +
- + - + @@ -131,28 +131,8 @@ - + - - - - - - - - - - - - - - - - - - - - @@ -164,63 +144,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - + - - - - - - - - - + + + - + - - + + - + - - - - - - @@ -232,44 +170,50 @@ - + - - - + + - + - + - + - - + + + + + + + + + - + - - + + - + - - + + - + @@ -281,8 +225,26 @@ - + + + + + + + + + + + + + + + + + + + @@ -294,50 +256,18 @@ - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -385,72 +315,20 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -482,34 +360,46 @@ - + - - - - - - - - - + + + + + + + + + - + - - - + + + + + + + + + - + - - - + + + + + + + + + - + @@ -522,8 +412,23 @@ - + + + + + + + + + + + + + + + + @@ -535,6 +440,13 @@ + + + + + + + @@ -585,7 +497,7 @@
- + @@ -677,7 +589,7 @@
- + Index: lams_tool_images/db/sql/create_lams_tool_imageGallery.sql =================================================================== diff -u -r2ded08a63789390122f15ab1c3c70075ed0d2a2e -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/db/sql/create_lams_tool_imageGallery.sql (.../create_lams_tool_imageGallery.sql) (revision 2ded08a63789390122f15ab1c3c70075ed0d2a2e) +++ lams_tool_images/db/sql/create_lams_tool_imageGallery.sql (.../create_lams_tool_imageGallery.sql) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -5,6 +5,8 @@ drop table if exists tl_laimag10_imageGallery_item_visit_log; drop table if exists tl_laimag10_session; drop table if exists tl_laimag10_user; +drop table if exists tl_laimag10_configuration; + create table tl_laimag10_attachment ( attachment_uid bigint not null auto_increment, file_version_id bigint, @@ -88,6 +90,13 @@ imageGallery_uid bigint, primary key (uid) )type=innodb; +create table tl_laimag10_configuration ( + uid bigint not null auto_increment, + config_key varchar(30) unique, + config_value varchar(255), + primary key (uid) +)TYPE=InnoDB; + alter table tl_laimag10_attachment add index FK_NEW_1821149711_1E7009430E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_1E7009430E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); alter table tl_laimag10_imageGallery add index FK_NEW_1821149711_89093BF758092FB (create_by), add constraint FK_NEW_1821149711_89093BF758092FB foreign key (create_by) references tl_laimag10_user (uid); alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F93758092FB (create_by), add constraint FK_NEW_1821149711_F52D1F93758092FB foreign key (create_by) references tl_laimag10_user (uid); @@ -99,11 +108,15 @@ alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1821149711_30113BFCEC0D3147 foreign key (session_uid) references tl_laimag10_session (uid); alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFC309ED320 (imageGallery_uid), add constraint FK_NEW_1821149711_30113BFC309ED320 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); - - INSERT INTO `tl_laimag10_imageGallery` (`uid`, `create_date`, `update_date`, `create_by`, `title`, `run_offline`, `lock_on_finished`, `instructions`, `next_image_title`, `online_instructions`, `offline_instructions`, `content_in_use`, `define_later`, `content_id`, `allow_comment_images`, `allow_share_images`, `allow_vote`, `allow_rank`, `reflect_on_activity`) VALUES (1,NULL,NULL,NULL,'ImageGallery','0','0','Instructions ',1,null,null,0,0,${default_content_id},0,0,0,0,0); + +INSERT INTO `tl_laimag10_configuration` (`config_key`, `config_value`) VALUES + ('mediumImageDimensions', '640'); +INSERT INTO `tl_laimag10_configuration` (`config_key`, `config_value`) VALUES + ('thumbnailImageDimensions', '100'); + SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_images/db/sql/table-schema.sql =================================================================== diff -u -r2ded08a63789390122f15ab1c3c70075ed0d2a2e -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/db/sql/table-schema.sql (.../table-schema.sql) (revision 2ded08a63789390122f15ab1c3c70075ed0d2a2e) +++ lams_tool_images/db/sql/table-schema.sql (.../table-schema.sql) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -14,12 +14,14 @@ drop table if exists tl_laimag10_imageGallery_item; drop table if exists tl_laimag10_session; drop table if exists tl_laimag10_user; +drop table if exists tl_laimag10_configuration; create table tl_laimag10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, imageGallery_uid bigint, primary key (uid)); create table tl_laimag10_item_log (uid bigint not null auto_increment, access_date datetime, imageGallery_item_uid bigint, user_uid bigint, complete bit, session_id bigint, primary key (uid)); create table tl_laimag10_imageGallery (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), run_offline bit, lock_on_finished bit, instructions text, next_image_title bigint, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, allow_comment_images bit, allow_share_images bit, number_columns integer DEFAULT 3, allow_vote bit, reflect_instructions varchar(255), reflect_on_activity bit,allow_rank tinyint DEFAULT 0, primary key (uid)); create table tl_laimag10_imageGallery_item (uid bigint not null auto_increment, description varchar(255), title varchar(255), create_by bigint, create_date datetime, create_by_author bit, sequence_id integer, is_hide bit, imageGallery_uid bigint, session_uid bigint, original_file_uuid bigint, medium_file_uuid bigint, thumbnail_file_uuid bigint, file_version_id bigint, file_type varchar(255), file_name varchar(255), primary key (uid)); create table tl_laimag10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, imageGallery_uid bigint, session_id bigint, session_name varchar(250), primary key (uid)); create table tl_laimag10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), first_name varchar(255), login_name varchar(255), session_uid bigint, imageGallery_uid bigint, session_finished bit, primary key (uid)); +create table tl_laimag10_configuration (uid bigint not null auto_increment, config_key varchar(30) unique, config_value varchar(255), primary key (uid)); alter table tl_laimag10_attachment add index FK_NEW_1821149711_1E7009430E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_1E7009430E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid); alter table tl_laimag10_item_log add index FK_NEW_1821149711_63195BC938BF8DFE (imageGallery_item_uid), add constraint FK_NEW_1821149711_63195BC938BF8DFE foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid); alter table tl_laimag10_item_log add index FK_NEW_1821149711_63195BC941F9365D (user_uid), add constraint FK_NEW_1821149711_63195BC941F9365D foreign key (user_uid) references tl_laimag10_user (uid); Index: lams_tool_images/db/sql/tool_insert.sql =================================================================== diff -u -r8a7c47632a6a93892f015f068d12adb376c0ae2d -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 8a7c47632a6a93892f015f068d12adb376c0ae2d) +++ lams_tool_images/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -30,7 +30,8 @@ classpath_addition, context_file, create_date_time, -modified_date_time +modified_date_time, +admin_url ) VALUES ( @@ -60,5 +61,6 @@ 'lams-tool-laimag10.jar', '/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml', NOW(), -NOW() +NOW(), +'tool/laimag10/laimag10admin/start.do' ) Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/ImageGalleryConstants.java =================================================================== diff -u -r8a7c47632a6a93892f015f068d12adb376c0ae2d -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/ImageGalleryConstants.java (.../ImageGalleryConstants.java) (revision 8a7c47632a6a93892f015f068d12adb376c0ae2d) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/ImageGalleryConstants.java (.../ImageGalleryConstants.java) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -125,6 +125,10 @@ public static final String ERROR_MSG_INVALID_URL = "error.resource.item.invalid.url"; public static final String ERROR_MSG_UPLOAD_FAILED = "error.upload.failed"; + + public static final String ERROR_MSG_REQUIRED_FIELDS_MISSING = "error.required.fields.missing"; + + public static final String ERROR_MSG_ENTERED_VALUES_NOT_INTEGERS = "error.entered.values.not.integers"; public static final String PAGE_EDITABLE = "isPageEditable"; Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryConfigItemDAO.java =================================================================== diff -u --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryConfigItemDAO.java (revision 0) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryConfigItemDAO.java (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -0,0 +1,34 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.imageGallery.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryConfigItem; + +public interface ImageGalleryConfigItemDAO extends IBaseDAO +{ + void saveOrUpdate(ImageGalleryConfigItem toConfig); + public ImageGalleryConfigItem getConfigItemByKey(final String configKey); +} + \ No newline at end of file Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryConfigItemDAOHibernate.java =================================================================== diff -u --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryConfigItemDAOHibernate.java (revision 0) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryConfigItemDAOHibernate.java (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -0,0 +1,50 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate; + +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryConfigItemDAO; +import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryConfigItem; +import org.springframework.orm.hibernate3.HibernateCallback; + +public class ImageGalleryConfigItemDAOHibernate extends BaseDAO implements ImageGalleryConfigItemDAO { + private static final String LOAD_CONFIG_ITEM_BY_KEY = "from ImageGalleryConfigItem configuration" + + " where configuration.configKey=:key"; + + public ImageGalleryConfigItem getConfigItemByKey(final String configKey) { + return (ImageGalleryConfigItem) getHibernateTemplate().execute(new HibernateCallback() { + public Object doInHibernate(Session session) throws HibernateException { + return session.createQuery(LOAD_CONFIG_ITEM_BY_KEY).setString("key", configKey).uniqueResult(); + } + }); + + } + + public void saveOrUpdate(ImageGalleryConfigItem mdlForumConfigItem) { + this.getHibernateTemplate().saveOrUpdate(mdlForumConfigItem); + this.getHibernateTemplate().flush(); + } +} Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml =================================================================== diff -u -r8a7c47632a6a93892f015f068d12adb376c0ae2d -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml (.../imageGalleryApplicationContext.xml) (revision 8a7c47632a6a93892f015f068d12adb376c0ae2d) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml (.../imageGalleryApplicationContext.xml) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -25,6 +25,7 @@ org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.hbm.xml org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.hbm.xml org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.hbm.xml + org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.hbm.xml @@ -63,6 +64,12 @@ + + + + + + @@ -89,6 +96,9 @@ + + + Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.hbm.xml =================================================================== diff -u --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.hbm.xml (revision 0) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.hbm.xml (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.java =================================================================== diff -u --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.java (revision 0) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryConfigItem.java (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -0,0 +1,73 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.imageGallery.model; + +/** + * @hibernate.class table="tl_laimag10_configuration" + */ +public class ImageGalleryConfigItem implements java.io.Serializable { + + private static final long serialVersionUID = 6360672537352753361L; + + public static final String KEY_MEDIUM_IMAGE_DIMENSIONS = "mediumImageDimensions"; + public static final String KEY_THUMBNAIL_IMAGE_DIMENSIONS = "thumbnailImageDimensions"; + + Long id; + String configKey; + String configValue; + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + /** + * @hibernate.property column="config_key" length="30" not-null="false" unique="true" + */ + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + /** + * @hibernate.property column="config_value" length="255" not-null="false" + */ + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } +} Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.hbm.xml =================================================================== diff -u -r2ded08a63789390122f15ab1c3c70075ed0d2a2e -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.hbm.xml (.../ImageGalleryItem.hbm.xml) (revision 2ded08a63789390122f15ab1c3c70075ed0d2a2e) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.hbm.xml (.../ImageGalleryItem.hbm.xml) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -50,7 +50,41 @@ column="sequence_id" /> + + + + + + + + - - - - - - - - + + + + + \ No newline at end of file Index: lams_tool_images/web/pages/authoring/parts/itemlist.jsp =================================================================== diff -u -r2ded08a63789390122f15ab1c3c70075ed0d2a2e -r915129e3bb3a93900f4098aee480629c55d752e9 --- lams_tool_images/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 2ded08a63789390122f15ab1c3c70075ed0d2a2e) +++ lams_tool_images/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 915129e3bb3a93900f4098aee480629c55d752e9) @@ -19,17 +19,17 @@ - - @@ -41,7 +41,7 @@ --%> - - -
+ ${image.thumbnailFileUuid}&preferDownload=false ${image.mediumFileUuid}&preferDownload=false - + + ${image.title} + " @@ -66,13 +66,13 @@ + " onclick="editItem(${status.index},'${sessionMapID}')" /> + " onclick="deleteItem(${status.index},'${sessionMapID}')" />