contentview_Marking.js 22.9 KB
Newer Older
1 2 3 4 5 6
/// コンテンツ閲覧画面_マーキングツールバーオーバーレイ

/// ===============================================================================================
/// Marking group [start]
/// ===============================================================================================

7 8 9
//名前空間用のオブジェクトを用意する
var CONTENTVIEW_MARKING = {};

10
// Set default value for easer.
11
CONTENTVIEW_MARKING.Marking_SetDefaultValue = function() {
12 13 14 15 16 17 18
};

/*
----------------------------------------------------------------------------
Event groups [start]
----------------------------------------------------------------------------
*/
19 20
CONTENTVIEW_MARKING.dlgMarking_dspSave_click = function() {
	CONTENTVIEW_GENERAL.imgMarkerTemp = CONTENTVIEW_GENERAL.canvas_marker.toDataURL("image/png;");
21 22 23 24
	
	var img = new Image();
	img.onload = function () {
	    //TRB00098
25
		CONTENTVIEW_GENERAL.context_draw.drawImage(img, 0, 0, CONTENTVIEW_GENERAL.canvas_draw.width, CONTENTVIEW_GENERAL.canvas_draw.height);
26 27 28 29 30
        //TRB00098
        
	    
        //START TRB00098         
        var saveImg = new Image();
31
        var saveImgUrl = CONTENTVIEW_GENERAL.canvas_draw.toDataURL("image/png");  
32 33 34 35
        
        saveImg.onload = function(){
            /*create new entity marking */
            var marking = new MarkingEntity();
36 37
            marking.contentid = CONTENTVIEW_GENERAL.contentID;
            if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image){         
38 39
                marking.pageNo = 1;
            }else{
40
                marking.pageNo = CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex());
41 42
            }
            var saveCanvas = document.createElement('canvas');
43
            //#11478
44 45 46 47
            //saveCanvas.width = CONTENTVIEW_GENERAL.canvas_offscreen.width;
            //saveCanvas.height = CONTENTVIEW_GENERAL.canvas_offscreen.height;
            saveCanvas.width = CONTENTVIEW_GENERAL.widthEachPageApi;
            saveCanvas.height = CONTENTVIEW_GENERAL.heightEachPageApi;
48
            
49 50 51 52 53 54
            var saveContext = saveCanvas.getContext('2d');
            saveContext.drawImage(saveImg, 0, 0, saveCanvas.width, saveCanvas.height);
            
            marking.content = saveCanvas.toDataURL("image/png");     
            //END TRB00098       
            //=== Start Function : No.17    Editor : Long   Date: 07/30/2013   Summary : Set UTC time and UUID when create new marking/maker.
Masaru Abe committed
55
            marking.markingid = COMMON.getUUID();
56 57 58 59 60 61 62
            marking.registerDate = new Date();
            //=== End Function : No.17    Editor : Long   Date: 07/30/2013   Summary : Set UTC time and UUID when create new marking/maker.    
            /* insert marking */
            var arr = ClientData.MarkingData();
            var nIndexMarking = -1;
    
            for (var nIndex = 0; nIndex < arr.length; nIndex++) {
63 64
                if (arr[nIndex].contentid == CONTENTVIEW_GENERAL.contentID
                && arr[nIndex].pageNo == CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex())) {
65 66 67 68 69
                    nIndexMarking = nIndex;
                    break;
                }
            }
    
70 71
            if (CONTENTVIEW_GENERAL.isDrawing == true) {/* if has draw image */
                if (CONTENTVIEW_GENERAL.isClearDrawing == true) {
72 73 74 75 76 77 78 79 80
                    arr.splice(nIndexMarking, 1);
                } else {
                    /* case not exist marking */
                    if (nIndexMarking == -1) {
                        arr.push(marking);
                    } else {
                        /* case exist marking */
                       //=== Start Function : No.17    Editor : Long   Date: 07/30/2013   Summary : Set UTC time when edit marking/maker.
                       var editedMarkingEntity = arr[nIndexMarking];
81
                       //#11478
82
                       //editedMarkingEntity.content = CONTENTVIEW_GENERAL.canvas_draw.toDataURL("image/png");
83
                       editedMarkingEntity.content = marking.content;
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
                       editedMarkingEntity.registerDate = new Date();
                       
                       arr[nIndexMarking] =  editedMarkingEntity;                                        
                       //arr[nIndexMarking] = marking;  
                       //=== End Function : No.17    Editor : Long   Date: 07/30/2013   Summary : Set UTC time when edit marking/maker.                                                        
                    }
                }
            }
    
            /*add marking to local storage */
            ClientData.MarkingData(arr);
    
            // Close dialog
            //$("#dlgMarking").dialog('close');
            $("#dlgMarking").hide();
            ClientData.IsAddingMarking(false);
            $('#draw_canvas').css('display', 'none');
    
            /*set flag change marking */
            ClientData.isChangedMarkingData(true);
    
            ClientData.IsHideToolbar(false);
    
            /* draw again*/
108 109 110
            //CONTENTVIEW.drawCanvas();
            //CONTENTVIEW_GENERAL.disableAllControl();  
            CONTENTVIEW.handleDisplayToolbar();
111 112 113 114
            /* visible button fullscreen */
            //$('#control_screen_2').show();
    
            /* init clear drawing canvas */
115
            CONTENTVIEW_GENERAL.isClearDrawing = false;
116 117 118
        };
        saveImg.src = saveImgUrl;                                               
	};
119
	img.src = CONTENTVIEW_GENERAL.imgMarkerTemp;	
120
	
121
	CONTENTVIEW_GENERAL.context_marker.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_marker.width, CONTENTVIEW_GENERAL.canvas_marker.height);
122 123 124 125 126
	
	$('#marker_canvas').css('display','none');		 

};

127
CONTENTVIEW_MARKING.dlgMarking_dspCancel_click = function() {
128 129 130 131
    // Close dialog    
    $("#dlgMarking").hide();  	
    
    /* init clear drawing canvas */
132
    CONTENTVIEW_GENERAL.isClearDrawing = false;
133 134 135 136 137 138 139 140 141
    
    ClientData.IsAddingMarking(false);
	$('#draw_canvas').css('display','none');    
   
    /*$('#imgmarkingtoolbar').removeClass('markingToolbar');
	$('#imgmarkingtoolbar').addClass('markingToolbar_off');
	$("#imgmarkingtoolbar").removeAttr("style")*/
	
    ClientData.IsHideToolbar(false);
142
    CONTENTVIEW_GENERAL.context_draw.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_draw.width, CONTENTVIEW_GENERAL.canvas_draw.height);
143 144
    
    /* draw again*/
145 146 147
    //CONTENTVIEW.drawCanvas();
    //CONTENTVIEW_GENERAL.disableAllControl();
    CONTENTVIEW.handleDisplayToolbar();
148 149 150 151 152 153
    /* visible button fullscreen */
	//$('#control_screen_2').show();   
	
	$('#marker_canvas').css('display','none');	
};

154
CONTENTVIEW_MARKING.dlgMarking_dspPgClear_click = function() {
155 156
    
    // Close dialog
157 158
	CONTENTVIEW_GENERAL.context_draw.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_draw.width, CONTENTVIEW_GENERAL.canvas_draw.height);
    CONTENTVIEW_GENERAL.context_marker.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_marker.width, CONTENTVIEW_GENERAL.canvas_marker.height);
159

160
     CONTENTVIEW_GENERAL.isClearDrawing = true;
161 162 163 164 165 166
     
     /* clear on local */
     var arr = ClientData.MarkingData();	
};

/* draw marker canvas to draw canvas */
167 168
CONTENTVIEW_MARKING.canvasMarkerToCanvasDraw = function(){
	CONTENTVIEW_GENERAL.imgMarkerTemp = CONTENTVIEW_GENERAL.canvas_marker.toDataURL("image/png;");
169 170 171
	
	var img = new Image();
	img.onload = function () {
172
		CONTENTVIEW_GENERAL.context_draw.drawImage(img, 0, 0, CONTENTVIEW_GENERAL.canvas_draw.width, CONTENTVIEW_GENERAL.canvas_draw.height);
173
	};
174
	img.src = CONTENTVIEW_GENERAL.imgMarkerTemp;	
175
	
176
	CONTENTVIEW_GENERAL.context_marker.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_marker.width, CONTENTVIEW_GENERAL.canvas_marker.height);
177 178 179 180 181
	
	 $('#marker_canvas').css('display','none');		 
};


182
CONTENTVIEW_MARKING.dlgMarking_imgPen_click = function() {
183 184 185 186 187 188
    // Choose pen
    $("#dlgMarking_imgMaker").removeClass();
    $("#dlgMarking_imgPen").addClass('toolbar_icon_on');
    $("#dlgMarking_imgEraser").removeClass();

    ClientData.MarkingType("pen");
189
    CONTENTVIEW_GENERAL.markingType = "pen";
190
    
191
    CONTENTVIEW_MARKING.canvasMarkerToCanvasDraw();
192
    
193
    CONTENTVIEW_MARKING.setDefaultImageForMarking();
194
};
195 196

CONTENTVIEW_MARKING.dlgMarking_imgPenOption_click = function() {
197
	/*disable button */
198
	CONTENTVIEW_MARKING.disableButtonMarking();
199 200 201
	//ClientData.IsAddingMarking(false);
	/* display dialog overlay */
    $("#overlay").show();
202
    CONTENTVIEW_GENERAL.isAddingMarking = ClientData.IsAddingMarking();
203 204
	
    // Show option of pen
205
    CONTENTVIEW_PEN.ShowPen($('#dlgPen'));
206 207
    
    /* draw maker canvas */
208 209
    if(CONTENTVIEW_GENERAL.markingType == "maker"){
    	CONTENTVIEW_MARKING.canvasMarkerToCanvasDraw();
210 211 212
    }
    
    ClientData.MarkingType("pen");
213
    CONTENTVIEW_GENERAL.markingType = "pen";
214 215 216 217
    
    $('#dlgMarking_imgPenOption').removeClass();
	$('#dlgMarking_imgPenOption').addClass('pen_option_selected');
	
218
	CONTENTVIEW_MARKING.setDefaultImageForMarking();
219 220
	
};
221 222

CONTENTVIEW_MARKING.dlgMarking_imgMaker_click = function() {
223 224 225 226 227 228
    // Choose maker
    $("#dlgMarking_imgMaker").addClass('toolbar_icon_on');
    $("#dlgMarking_imgPen").removeClass();
    $("#dlgMarking_imgEraser").removeClass();

    ClientData.MarkingType("maker");
229
    CONTENTVIEW_GENERAL.markingType = "maker";
230 231
    $('#marker_canvas').css('display','block');    
    
232
    CONTENTVIEW_MARKING.setDefaultImageForMarking();
233
};
234 235

CONTENTVIEW_MARKING.dlgMarking_imgMakerOption_click = function() {
236
	/*disable button */
237
	CONTENTVIEW_MARKING.disableButtonMarking();
238 239 240
	//ClientData.IsAddingMarking(false);
	 /* display dialog overlay */
    $("#overlay").show();
241
    CONTENTVIEW_GENERAL.isAddingMarking = ClientData.IsAddingMarking();
242 243
	
    // Show option of maker
244
    CONTENTVIEW_MAKER.ShowMaker($('#dlgMaker'));
245 246
    
    ClientData.MarkingType("maker");
247
    CONTENTVIEW_GENERAL.markingType = "maker";
248 249 250 251 252
    $('#marker_canvas').css('display','block');   
    
    $('#dlgMarking_imgMakerOption').removeClass();
	$('#dlgMarking_imgMakerOption').addClass('maker_option_selected');
	
253
	CONTENTVIEW_MARKING.setDefaultImageForMarking();
254
};
255 256

CONTENTVIEW_MARKING.dlgMarking_imgEraser_click = function() {
257 258 259 260 261 262
    // Choose eraser
    $("#dlgMarking_imgMaker").removeClass();
    $("#dlgMarking_imgPen").removeClass();
    $("#dlgMarking_imgEraser").addClass('toolbar_icon_on');

    ClientData.MarkingType("eraser");
263 264
    CONTENTVIEW_GENERAL.markingType = "eraser";
    CONTENTVIEW_MARKING.canvasMarkerToCanvasDraw(); 
265
    
266
    CONTENTVIEW_MARKING.setDefaultImageForMarking(); 
267
};
268 269

CONTENTVIEW_MARKING.dlgMarking_imgEraserOption_click = function() {
270
	/*disable button */
271
	CONTENTVIEW_MARKING.disableButtonMarking();
272 273 274
	//ClientData.IsAddingMarking(false);
	/* display dialog overlay */
    $("#overlay").show();
275
    CONTENTVIEW_GENERAL.isAddingMarking = ClientData.IsAddingMarking();
276 277
	
    // Show option of maker
278
    CONTENTVIEW_GOMU.ShowEraser();
279 280
    
    /* draw maker canvas */
281 282
    if(CONTENTVIEW_GENERAL.markingType == "maker"){
    	CONTENTVIEW_MARKING.canvasMarkerToCanvasDraw();
283 284 285
    }
    
    ClientData.MarkingType("eraser");
286
    CONTENTVIEW_GENERAL.markingType = "eraser";
287 288 289 290
    
    $('#dlgMarking_imgEraserOption').removeClass();
	$('#dlgMarking_imgEraserOption').addClass('eraser_option_selected');
	
291
	CONTENTVIEW_MARKING.setDefaultImageForMarking();
292 293
};

294
CONTENTVIEW_MARKING.dlgMarking_imgMin_click = function() {
295 296 297 298 299 300 301 302
    //$("#dlgMarking_body").slideToggle('fast');
    $("#dlgMarking_imgMin").hide();  
    $("#dlgMarking_imgMax").show();
	$("#dlgMarking_body").removeClass('markingBoxBody_on');
    $("#dlgMarking_body").addClass('markingBoxBody_off');
    //$('#dlgMarking').dialog({ height: 80});
    //$('#dlgMarking').css('height', '29px');
};
303 304

CONTENTVIEW_MARKING.dlgMarking_imgMax_click = function() {
305 306 307 308 309 310 311 312
    //$("#dlgMarking_imgMin").slideToggle('fast');
    $("#dlgMarking_imgMax").hide();
    $("#dlgMarking_imgMin").show();
	$("#dlgMarking_body").addClass('markingBoxBody_on');
    $("#dlgMarking_body").removeClass('markingBoxBody_off');
    //$('#dlgMarking').dialog({height: 350});
    //$('#dlgMarking').css('height', '300px');
};
313 314

CONTENTVIEW_MARKING.dlgMarking_imgClose_click = function() {
315 316
    $("#dlgMarking").hide();
    ClientData.IsHideToolbar(true);
317
    CONTENTVIEW_GENERAL.disableAllControl();
318 319 320 321 322 323 324 325
    
};
/*
----------------------------------------------------------------------------
Event groups [ end ]
----------------------------------------------------------------------------
*/

326
CONTENTVIEW_MARKING.setDefaultImageForMarking = function(){	
327
	/* pen */
328
	if(CONTENTVIEW_GENERAL.markingType == "pen"){
329 330 331 332 333 334 335 336 337
		$('#dlgMarking_imgPen').removeClass();
		$('#dlgMarking_imgPen').addClass('pen_selected');
		
	}else{
		$('#dlgMarking_imgPen').removeClass();
		$('#dlgMarking_imgPen').addClass('pen_hover');
	}
	
	/* maker */
338
	if(CONTENTVIEW_GENERAL.markingType == "maker"){
339 340 341 342 343 344 345 346 347
		$('#dlgMarking_imgMaker').removeClass();
		$('#dlgMarking_imgMaker').addClass('maker_selected');
		
	}else{
		$('#dlgMarking_imgMaker').removeClass();
		$('#dlgMarking_imgMaker').addClass('maker_hover');
	}
	
	/* maker */
348
	if(CONTENTVIEW_GENERAL.markingType == "eraser"){
349 350 351 352 353 354 355 356 357 358
		$('#dlgMarking_imgEraser').removeClass();
		$('#dlgMarking_imgEraser').addClass('eraser_selected');
		
	}else{
		$('#dlgMarking_imgEraser').removeClass();
		$('#dlgMarking_imgEraser').addClass('eraser_hover');
	}
};

/* disable all button on dialog marking */
359
CONTENTVIEW_MARKING.disableButtonMarking = function(){
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
	$('#dlgMarking_dspSave').unbind('click');
	$('#dlgMarking_dspCancel').unbind('click');
	$('#dlgMarking_dspPgClear').unbind('click');
	$('#dlgMarking_imgMin').unbind('click');
	$('#dlgMarking_imgMax').unbind('click');
	$('#dlgMarking_imgClose').unbind('click');
	$('#dlgMarking_imgPen').unbind('click');
	$('#dlgMarking_imgPenOption').unbind('click');
	$('#dlgMarking_imgMaker').unbind('click');
	$('#dlgMarking_imgMakerOption').unbind('click');
	$('#dlgMarking_imgEraser').unbind('click');
	$('#dlgMarking_imgEraserOption').unbind('click');
	
	/* set cursor default*/
	$("#dlgMarking_dspSave").css('cursor', 'default');
	$("#dlgMarking_dspCancel").css('cursor', 'default');
	$("#dlgMarking_dspPgClear").css('cursor', 'default');
	$("#dlgMarking_imgMin").css('cursor', 'default');
	$("#dlgMarking_imgMax").css('cursor', 'default');
	$("#dlgMarking_imgClose").css('cursor', 'default');
	$("#dlgMarking_imgPen").css('cursor', 'default');
	$("#dlgMarking_imgPenOption").css('cursor', 'default');
	$("#dlgMarking_imgMaker").css('cursor', 'default');
	$("#dlgMarking_imgMakerOption").css('cursor', 'default');
	$("#dlgMarking_imgEraser").css('cursor', 'default');
	$("#dlgMarking_imgEraserOption").css('cursor', 'default');
	
	
};

/* enable all button con dialog marking */
391 392 393 394 395 396 397 398 399 400 401 402 403 404
CONTENTVIEW_MARKING.enableButtonMarking = function(){
	CONTENTVIEW_MARKING.disableButtonMarking();
	$('#dlgMarking_dspSave').bind('click',CONTENTVIEW_MARKING.dlgMarking_dspSave_click);
	$('#dlgMarking_dspCancel').bind('click',CONTENTVIEW_MARKING.dlgMarking_dspCancel_click);
	$('#dlgMarking_dspPgClear').bind('click',CONTENTVIEW_MARKING.dlgMarking_dspPgClear_click);
	$('#dlgMarking_imgMin').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgMin_click);
	$('#dlgMarking_imgMax').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgMax_click);
	$('#dlgMarking_imgClose').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgClose_click);
	$('#dlgMarking_imgPen').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgPen_click);
	$('#dlgMarking_imgPenOption').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgPenOption_click);
	$('#dlgMarking_imgMaker').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgMaker_click);
	$('#dlgMarking_imgMakerOption').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgMakerOption_click);
	$('#dlgMarking_imgEraser').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgEraser_click);
	$('#dlgMarking_imgEraserOption').bind('click',CONTENTVIEW_MARKING.dlgMarking_imgEraserOption_click);	
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
	
	/* set cursor pointer*/
	$("#dlgMarking_dspSave").css('cursor', 'pointer');
	$("#dlgMarking_dspCancel").css('cursor', 'pointer');
	$("#dlgMarking_dspPgClear").css('cursor', 'pointer');
	$("#dlgMarking_imgMin").css('cursor', 'pointer');
	$("#dlgMarking_imgMax").css('cursor', 'pointer');
	$("#dlgMarking_imgClose").css('cursor', 'pointer');
	$("#dlgMarking_imgPen").css('cursor', 'pointer');
	$("#dlgMarking_imgPenOption").css('cursor', 'pointer');
	$("#dlgMarking_imgMaker").css('cursor', 'pointer');
	$("#dlgMarking_imgMakerOption").css('cursor', 'pointer');
	$("#dlgMarking_imgEraser").css('cursor', 'pointer');
	$("#dlgMarking_imgEraserOption").css('cursor', 'pointer');
};

421
CONTENTVIEW_MARKING.ShowMarking = function() {
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
    //$("#dlgMarking_body").show();
    //$("#dlgMarking_body").addClass('markingBoxBody_on');
    //$("#dlgMarking_body").removeClass('markingBoxBody_on');
    
    
    //$('#dlgMarking').dialog({ height: 350 });
    //$('#dlgMarking').css('height', '300px');

    //$('#dlgMarking').dialog("open");
    $('#dlgMarking').css('top', '40px');
	$('#dlgMarking').css('left', '10px');
    $('#dlgMarking').show();
    //$('#dlgMarking').fadeIn('fast');	
	    
//    $('#dlgMarking').center();
//    $('#dlgMarking').top();
//    $('#dlgMarking').bottom();

    //$(".ui-dialog-titlebar").hide();
441
    CONTENTVIEW_MARKING.Marking_SetDefaultValue();
442 443 444
    //$("#dlgMarking_imgMin").show();
   // $("#dlgMarking_imgMax").hide();

445
    CONTENTVIEW_MARKING.dlgMarking_imgPen_click();
446
    
447
    CONTENTVIEW_MARKING.setDefaultImageForMarking();
448 449 450 451 452 453 454 455 456 457 458 459 460
    
	$('#dlgMarking_imgPenOption').removeClass();
	$('#dlgMarking_imgPenOption').addClass('pen_option_hover');
	
	$('#dlgMarking_imgMakerOption').removeClass();
	$('#dlgMarking_imgMakerOption').addClass('maker_option_hover');
	
	$('#dlgMarking_imgEraserOption').removeClass();
	$('#dlgMarking_imgEraserOption').addClass('eraser_option_hover');
};

// Setting dialog
$(function () {
461 462 463 464
	//CONTENTVIEW_MARKING.ready();
});

CONTENTVIEW_MARKING.ready = function(){
465
	
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
    //$("#dlgMarking_dspSave").click(CONTENTVIEW_MARKING.dlgMarking_dspSave_click);
    $("#dlgMarking_dspSave").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_dspSave_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_dspCancel").click(CONTENTVIEW_MARKING.dlgMarking_dspCancel_click);
    $("#dlgMarking_dspCancel").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_dspCancel_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_dspPgClear").click(CONTENTVIEW_MARKING.dlgMarking_dspPgClear_click);
    $("#dlgMarking_dspPgClear").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_dspPgClear_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
501 502

    // Icons
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610
    //$("#dlgMarking_imgMin").click(CONTENTVIEW_MARKING.dlgMarking_imgMin_click);
    $("#dlgMarking_imgMin").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgMin_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgMax").click(CONTENTVIEW_MARKING.dlgMarking_imgMax_click);
    $("#dlgMarking_imgMax").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgMax_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgClose").click(CONTENTVIEW_MARKING.dlgMarking_imgClose_click);
    $("#dlgMarking_imgClose").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgClose_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgPen").click(CONTENTVIEW_MARKING.dlgMarking_imgPen_click);
    $("#dlgMarking_imgPen").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgPen_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgPenOption").click(CONTENTVIEW_MARKING.dlgMarking_imgPenOption_click);
    $("#dlgMarking_imgPenOption").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgPenOption_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgMaker").click(CONTENTVIEW_MARKING.dlgMarking_imgMaker_click);
    $("#dlgMarking_imgMaker").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgMaker_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgMakerOption").click(CONTENTVIEW_MARKING.dlgMarking_imgMakerOption_click);
    $("#dlgMarking_imgMakerOption").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgMakerOption_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgEraser").click(CONTENTVIEW_MARKING.dlgMarking_imgEraser_click);
    $("#dlgMarking_imgEraser").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgEraser_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
    //$("#dlgMarking_imgEraserOption").click(CONTENTVIEW_MARKING.dlgMarking_imgEraserOption_click);
    $("#dlgMarking_imgEraserOption").on({
    	'click touchend': function(ev){
    		CONTENTVIEW_MARKING.dlgMarking_imgEraserOption_click(ev);
    		return false;
    	},
    	'touchstart touchmove': function(){
    		//これを入れないと次にダイアログを開くと表示位置が大きくズレる
    		return false;
    	}
    });
    
611 612 613 614 615 616 617 618 619 620 621 622 623
    /*
    $('#dlgMarking').dialog({
        autoOpen: false,
        title: '',
        modal: false,
        resizable: false,
        width: 300,
        height: 350
    });
    */
    $('#dlgMarking').draggable({
        revert: false
    });
624 625
	
};
626 627 628 629 630 631

/// ===============================================================================================
/// Marking group [ end ]
/// ===============================================================================================