Advertisement
Guest User

emwui_p1.patch

a guest
Feb 5th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.76 KB | None | 0 0
  1. diff --git a/HttpPublic/EMWUI/js/common.js b/HttpPublic/EMWUI/js/common.js
  2. index 4ccc432..effad4f 100644
  3. --- a/HttpPublic/EMWUI/js/common.js
  4. +++ b/HttpPublic/EMWUI/js/common.js
  5. @@ -119,7 +119,7 @@ function delNotify(notify, data, noSnack){
  6.  }
  7.  
  8.  //通知登録
  9. -var NotifySound = $('<audio src="' + path + 'video/notification.mp3">')[0];
  10. +var NotifySound = $('<audio src="' + root + 'video/notification.mp3">')[0];
  11.  NotifySound.volume = 0.2;
  12.  function creatNotify(notify, data, save){
  13.     var notification = $('.mdl-js-snackbar').get(0);
  14. diff --git a/HttpPublic/EMWUI/recinfodesc.html b/HttpPublic/EMWUI/recinfodesc.html
  15. index 059345a..3363d95 100644
  16. --- a/HttpPublic/EMWUI/recinfodesc.html
  17. +++ b/HttpPublic/EMWUI/recinfodesc.html
  18. @@ -14,9 +14,9 @@ if v then
  19.    -- トランスコード済みのファイルがvideoフォルダにあればそっち使う
  20.    fname=string.match(w.recFilePath, '[^\\]*$') or ''
  21.    for i,ext in ipairs({'.mp4','.webm'}) do
  22. -    f=edcb.FindFile and edcb.FindFile(mg.script_name:gsub('[^\\/]*$','')..'video\\'..fname..ext, 1)
  23. +    f=edcb.FindFile and edcb.FindFile(mg.document_root..'\\video\\'..fname..ext, 1)
  24.      if f then
  25. -      video='video/'..fname..ext
  26. +      video=PathToRoot()..'video/'..fname..ext
  27.        break
  28.      end
  29.    end
  30. @@ -60,7 +60,7 @@ if v then
  31.      ..'</ul></section>'
  32.      
  33.      ..(video and '<section class="mdl-layout__tab-panel" id="movie">\n<div class="mdl-grid mdl-grid--no-spacing">\n'
  34. -      ..player('<video id="video" '..(ori and 'preload="none" data-path="'..video..'" data-duration="'..v.durationSecond..'"' or 'src="'..video..'" data-public="true" data-load="true"')..' data-rec="true"></video>\n', not ori)
  35. +      ..player('<video id="video" '..(ori and 'preload="none" data-path="'..video..'" data-duration="'..v.durationSecond..'"' or 'src="'..mg.url_encode(video):gsub('%%2f','/')..'" data-public="true" data-load="true"')..' data-rec="true"></video>\n', not ori)
  36.        ..'</div>\n</section>\n' or '')
  37.  
  38.      ..(#v.errInfo>0 and '<section class="mdl-layout__tab-panel" id="error">\n<div>\n<pre>'..v.errInfo..'</pre>\n</div>\n</section>\n' or '')
  39. diff --git a/HttpPublic/EMWUI/util.lua b/HttpPublic/EMWUI/util.lua
  40. index d034579..2130c5f 100644
  41. --- a/HttpPublic/EMWUI/util.lua
  42. +++ b/HttpPublic/EMWUI/util.lua
  43. @@ -35,7 +35,7 @@ function template(temp)
  44.  <script src="]=]..path..[=[js/jquery.hammer.js"></script>
  45.  ]=]
  46.  ..((temp.dialog or temp.progres) and '<script src="'..path..'js/dialog-polyfill.js"></script>\n' or '')
  47. -..'<script>path=\''..path..'\';root=\''..mg.script_name:gsub('[^\\/]*$',''):gsub(mg.document_root..'/',''):gsub('[^\\/]*[\\/]','../')..'\';</script>\n'
  48. +..'<script>path=\''..path..'\';root=\''..PathToRoot()..'\';</script>\n'
  49.  ..'<script src="'..path..'js/common.js"></script>\n'
  50.  
  51.  -- javascript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement