• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account Log out
  • Favorite
  • Project
  • Recent History
Loading...
  • Log in
  • Sign up
kadrians / Testing_for_YONA star
  • Project homeH
  • CodeC
  • IssueI 1
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB 2
  • Files
  • Commit
  • Branches
Testing_for_YONAsourcepublicjavascriptscommonyobi.ui.Mergely.js
Download as .zip file
File name
Commit message
Commit date
bin
Yona 1.16.0 Upload
02-04
lib
Yona 1.16.0 Upload
02-04
share/doc/api
Yona 1.16.0 Upload
02-04
source
Source Code Upload
02-04
README.md
Yona 1.16.0 Upload
02-04
File name
Commit message
Commit date
app
Source Code Upload
02-04
conf
Source Code Upload
02-04
docs
Source Code Upload
02-04
lib
Source Code Upload
02-04
project
Source Code Upload
02-04
public
Source Code Upload
02-04
support-script
Source Code Upload
02-04
test
Source Code Upload
02-04
.gitignore
Source Code Upload
02-04
.mailmap
Source Code Upload
02-04
.travis.yml
Source Code Upload
02-04
AUTHORS
Source Code Upload
02-04
LICENSE
Source Code Upload
02-04
NOTICE
Source Code Upload
02-04
README.md
Source Code Upload
02-04
build.sbt
Source Code Upload
02-04
dev.sh
Source Code Upload
02-04
dist.sh
Source Code Upload
02-04
is-alive-bot.sh
Source Code Upload
02-04
minify-js.sh
Source Code Upload
02-04
restart.sh
Source Code Upload
02-04
File name
Commit message
Commit date
bootstrap
Source Code Upload
02-04
help
Source Code Upload
02-04
images
Source Code Upload
02-04
javascripts
Source Code Upload
02-04
stylesheets
Source Code Upload
02-04
compiler.jar
Source Code Upload
02-04
File name
Commit message
Commit date
common
Source Code Upload
02-04
lib
Source Code Upload
02-04
service
Source Code Upload
02-04
template
Source Code Upload
02-04
yona-common.js
Source Code Upload
02-04
yona-layout.js
Source Code Upload
02-04
yona-lib.js
Source Code Upload
02-04
File name
Commit message
Commit date
yobi.Attachments.js
Source Code Upload
02-04
yobi.CodeCommentBlock.js
Source Code Upload
02-04
yobi.CodeCommentBox.js
Source Code Upload
02-04
yobi.Comment.js
Source Code Upload
02-04
yobi.CommentForm.js
Source Code Upload
02-04
yobi.Common.js
Source Code Upload
02-04
yobi.Files.js
Source Code Upload
02-04
yobi.Interval.js
Source Code Upload
02-04
yobi.LoginDialog.js
Source Code Upload
02-04
yobi.Markdown.js
Source Code Upload
02-04
yobi.Mention.js
Source Code Upload
02-04
yobi.OriginalMessage.js
Source Code Upload
02-04
yobi.Pagination.js
Source Code Upload
02-04
yobi.ShortcutKey.js
Source Code Upload
02-04
yobi.WatcherList.js
Source Code Upload
02-04
yobi.ui.Calendar.js
Source Code Upload
02-04
yobi.ui.Dialog.js
Source Code Upload
02-04
yobi.ui.Dropdown.js
Source Code Upload
02-04
yobi.ui.Mergely.js
Source Code Upload
02-04
yobi.ui.Select2.js
Source Code Upload
02-04
yobi.ui.Tabs.js
Source Code Upload
02-04
yobi.ui.Toast.js
Source Code Upload
02-04
yobi.ui.Typeahead.js
Source Code Upload
02-04
yona.CommentAttachmentsUpdate.js
Source Code Upload
02-04
yona.KeyControl.js
Source Code Upload
02-04
yona.ReceiverList.js
Source Code Upload
02-04
yona.Sha1.js
Source Code Upload
02-04
yona.SubComment.js
Source Code Upload
02-04
yona.Subtask.js
Source Code Upload
02-04
yona.Tasklist.js
Source Code Upload
02-04
yona.TitleHeadAutoCompletion.js
Source Code Upload
02-04
yona.Usermenu.js
Source Code Upload
02-04
Nell 02-04 2600fe6 Source Code Upload UNIX
Raw Open in browser Change history
/** * Yobi, Project Hosting SW * * Copyright 2013 NAVER Corp. * http://yobi.io * * @author JiHan Kim * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function(ns){ var oNS = $yobi.createNamespace(ns); oNS.container[oNS.name] = function(htOptions){ var htVar = {}; var htElement = {}; function _init(){ _initElement(); _initMergely(); _attachEvent(); } function _initElement(htOptions){ htElement.welMergelyWrap = $("#compare"); htElement.welMergely = $("#mergely"); htElement.welMergelyPathTitle = htElement.welMergelyWrap.find(".path > span"); htElement.welMergelyCommitA = htElement.welMergelyWrap.find(".commitA"); htElement.welMergelyCommitB = htElement.welMergelyWrap.find(".commitB"); } function _initMergely(){ var htWrapSize = _getMergelyWrapSize(); htElement.welMergely.mergely({ "width" : "auto", // "height": "auto", "height": (htWrapSize.nWrapHeight - 100) + "px", "editor_width": ((htWrapSize.nWrapWidth - 92) / 2) + "px", "editor_height": (htWrapSize.nWrapHeight - 100) + "px", "cmsettings":{"readOnly": true, "lineNumbers": true} }); } function _attachEvent(){ $(window).on("resize", _resizeMergely); } function _setButtons(sQuery){ $(sQuery).on("click", _onClickBtnFullDiff); } /** * @param {Wrapped Event} weEvt */ function _onClickBtnFullDiff(weEvt){ var welTarget = $(weEvt.target); var sCommitA = welTarget.attr("data-commitA"); var sCommitB = welTarget.attr("data-commitB"); var sPathA = welTarget.attr("data-pathA"); var sPathB = welTarget.attr("data-pathB"); var sRawA = welTarget.attr("data-rawA"); var sRawB = welTarget.attr("data-rawB"); // UpdateText htElement.welMergelyPathTitle.text((sPathA != sPathB) ? (sPathA + " -> " + sPathB) : sPathB); htElement.welMergelyCommitA.text(sCommitA); htElement.welMergelyCommitB.text(sCommitB); htElement.welMergelyWrap.modal(); _resizeMergely(); _updateMergely(sRawA, sRawB); } function _getMergelyWrapSize(){ return { "nWrapWidth" : window.innerWidth - 100, "nWrapHeight": window.innerHeight - (window.innerHeight * 0.2) }; } /** * @param {String} sRawURLFrom * @param {String} sRawURLTo */ function _updateMergely(sRawURLFrom, sRawURLTo){ // lhs = from $.get(sRawURLFrom).done(function(sData){ htElement.welMergely.mergely("lhs", sData); htElement.welMergely.mergely("resize"); htElement.welMergely.mergely("update"); }); // rhs = to $.get(sRawURLTo).done(function(sData){ htElement.welMergely.mergely("rhs", sData); htElement.welMergely.mergely("resize"); htElement.welMergely.mergely("update"); }); } function _resizeMergely(){ var htWrapSize = _getMergelyWrapSize(); var nWidth = ((htWrapSize.nWrapWidth - 92) / 2); var nHeight = (htWrapSize.nWrapHeight - 100); htElement.welMergelyWrap.css({ "width" : htWrapSize.nWrapWidth + "px", "height": htWrapSize.nWrapHeight + "px", "margin-left": -(htWrapSize.nWrapWidth / 2) + "px" }); htElement.welMergely.mergely("cm", "rhs").setSize(nWidth + "px", nHeight + "px"); htElement.welMergely.mergely("cm", "lhs").setSize(nWidth + "px", nHeight + "px"); $(".mergely-column").width(nWidth).height(nHeight); $(".CodeMirror").height(nHeight); } _init(htOptions || {}); return { "setButtons": _setButtons }; }; })("yobi.ui.Mergely");

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
login with Google Sign in with Google
Reset password | Sign up